Merge pull request #188 from ngoldman/master

fix corrupted images