fix the image resizing