fixed crash when reconnecting to zookeeper