Fixing voting errors. Misc fixes