fix gates problem in PacketGenerator