fixed bug with formulas