fix connect handshake