fixed issue with pi in formulas