fix some formulas, handle tiff, speex