Fix immersive mode implementation