make viewport and scroll parameters consistent