segfault related with unproperly zookeeper destruction

should be fixed.