Fixes for correct behavior on small replicaset when all servers disconnect at the same time for election
Updated version