add CA 17 exception, fix minor bug in top_candidate method, closes #766