Fix bugs in PacketResolver