adjust scaling when dealing with padding