fixed bugs in election. sanity test passes