Fixed bug in PacketStream