bugfix in formula printing (fixes proof checking)