Image resizing fix