fixed bad scaling code