Fixed bug where data was not getting written to the receiver's buffer