Have you try to erase the PIC before reprogram it? what is your actual clock speed? Can you send some snip or the whole code if somebody here can find something?