BUG FIX: When masking to produce unsigned bytes, use 0xFF instead of 0xFFFF.
For example:
-52 & 0xFF = 204 (correct)
-52 & 0xFFFF = 65484 (incorrect)