fix for SendAndReceive bug