what about if you add a PAUSE 50 or a bit much at the top of your code to give time to the internal oscillator to stabilize???