removed unnecessary scale/resize related logic (minor change).