Fixed bug in game code