Fixed SearchByCriteria method