Fixed memory usage, as well as disposal of clients.