rewrite normalizeCriteria to fix OR + CONTAINS bug