Fix potential PNet bugs.

Always cast everything that comes from the network to quint8. Always.
I had forgotten to cast some bytes, and they could have overflowed.