Fixed bug with formulas