fix typo in scaling code