Fix errors in game logic