strange issue with .gms files

sometime a simple code doesnt work and the next time when i use the same code it works

sometime it only works when i import that entire file to a new document or

again write that code in the same .gms file and save it again.

why this happen to me ?

any solution ?