Fixed crash when game closing! Woohoo!