Fix Viewport bugs