fixed bug for client exit from the cluster(fixed slave crash, master crash is still buggy)