Fixed up a bunch of the voting logic.