Fixed crash when loading the game.