minor improvements in leader election