Small improvement in function acceptPacket().