Manual merge of a loophole fix for the voting system.