Fixed defects with image resizing.