Fixed query when no candidates are found
Fixed query when no candidates are found