Fix segfault when starting the game.