If you post your program and/or schematic. we could point you in the right direction, but as it stands we don't know how your PIC is detecting the LED is lit, so it's difficult to answer.