close the client on stop