Viewport regression fixes