fix crash when going fullscreen