Fixed some logic errors in voterc.