fixing the image resizing