Fixed printing of formulas