Improved viewport control