fixed bug that caused ranked ballots to be miscounted