image rescale fix