fix some formulas