fixed bugs in Symbol comparison and formula printing