Fix case handling in formulas.