Fixed dealing with 16-bit data with byte typecodes