fix readCommonHeader

Slice 9 bytes (not 8).
Use flag mask (not pos).