Fix FormulaTree bug