fixed some errors indicated by IDEA
fix some Only vars assigned by reference
Merge pull request #381 from splitbrain/jpegmetafixes

Jpegmeta fixes