Fix bugs in PacketResolver and PacketResovlerTest