add missing condition for recalculating scale