Fixed issue with sending handshake