fix a bug in criteria where it re-adds extra clauses