Fix for issue with broken slave that can become master