Fixed some crashes in game.py.