Underlayment should be nailed to the subfloor plywood and not into the the floor joists below to make the underlayment and subfloor plywood work together uniformly.