Fix multiple send/recv bugs.