fix data sent and receive problem