Fix image resize code
Fix image resize code