Correct setting of number of primaries in header.