Correct rescale implementation