fix bug in criteria