make sure only w/h is compared before scaling