fix crash due to improper sdl quit