fix game logic bug