Added timeouts for leader retrieval.