Fix crash on client disconnect from zookeeper