fixed a couple of packet bugs