Fix the changing viewport when zooming with the slider.