make fullscreen handling closure friendly