Fixed bug: Exiting fullscreen would cause stack dump