small fix in Formula.simplify