new client connection code fixing