Fix length of packets.