fixing seed loop in gen_pkt