Fix bug with empty criteria