fix photo resizing issue