Fixing handshake error