minor bug fix for numCandidates