fixed image resizing issue