Image resize

Hi,

I’m using minimagick gem 3.8.0 version. I was having imagemagick 6.8.9-0
and resizing images worked ok with imagemagick. But after upgrading
imagemagick on version to 6.8.9-7 uploading some images won’t resize
with this error:

Corrupt JPEG data: 1712 extraneous bytes before marker 0xd9

Is there anyway to fix this? Or maybe to upgrade minimagick version?
Does anyone have experience with this error?

Thanks in advance