Fix some bugs of receive-buf, send-buf.