Fixed problem with image resize