fixed the replace leader test, there is still a deadlock issue, not sure
what's causing it :-(