I just wounder How my other code ever worked without a cap?
it can, but without OSCCAL... i don't think so, OR intermittent.

Place a 0.1uF or 0.22uF it's a need for all PICs apps. More than often people forget that the problem can comes from the hardware.

I always place 0.1uF + 10uF tantalum as close as possible to the PIC. Since now... only software problem