fixed maximum allowed candidates bug