core/scale: fix typos in scaling loop