Fixed a bug in singleplayer where it might crash. Also some other stuff