fix send/receive routine error