fix some game logic