Flag unpack bugfix and tinyint unpack simplification.