fix shameful unable to connect bug

 * memcpy parameter order was wrong