Thanks! I am so bad at math that I did not find the problem. Now I uploaded a new version of the game with bugs fixed.