Fix a problem when connecting ZooKeeper server