Fixed crashing on singleplayer