Divide by Zero error in the bitmap scaling code