fix jpegs issue on mac builds