Fixed memory leak with client connections