fix bugs in game.php