fix the re-scaling code