election bugfixes