added viewport scaling restriction