Encoders initialized, but not returning values

A strange issue has been occuring during our bots autonomous. Sometimes, during our autonomous, the encoders seem to return no values. I use the easyC PID control numerous times, and the program doesn’t move to the proper point, rather the next block is used rather than the PID loop. Furthermore, I have a statement essentially saying “while IME <= 2000 -> go up” This statement causes the bot to go up infinitely. The encoders are showing the double green flash, which, as I have read, means they are properly initialized, and, as previously mentioned, I am using easyC. Also, the issue seems to be fixed when I add a one millisecond wait to the beginning of the program and download but I think this is just a coincidence, though just re downloading doesn’t fix the issue. Anyone have any idea why this would occur?