Move SDL_Quit to fix exception message boxes not working