Changed game loop conditions