Fix rescale bug