solve many bugs in Criteria class