fixed a bug in the game logic