fixed client handshake issue