Fix for NoSuchElementException when resolving elections