fixed handshake response memory corruption bug. fixes for ARM