SDLContext was closing early