#861 Fixed image crop and resizing