Fix bug in compute_votes