Correct an error in the image resizing code.