Fixing some edge cases of Viewport movement