RPL: byte order fixes and debugging