fix recording of packet length in RX buffer.