Fix hashing of header. #2.
Fix reading of extension data. #2.