Fixed order of freeing in cleanup_game.