Fixed bug when printing and comparing boolean expressions.