Fixed scaling undo bug introduced by last commit