fixed segfault in singleplayer.cpp