rx_packet.c: fixing some problems