Fixing a bug in batch_vote