Fixed some bugs in clauses.py