fix the seg bug for pcap mode