Fixing the criteriasearch bug.