Fix issues when handling Jpegs where packJPG borks.