fixed faulty game logic