Include masks in the scale calculation