fixed handshake timeout condition