Changed position of fullscreen mode function