Improve max_candidates