Fix reading metadata type id.