Prevent a runtime error on fullscreen switch