Fix image resizing