is amended— (A) in subsection (c)(6)— (i) by striking section 223(d) and inserting section 223(c) , and (ii) by striking section 223(e)(2) and inserting section 223(d)(2) , and (B) in subsection (e)(1)(E), by striking section 223(d) and inserting section 223(c) . (12) Section 6693(a)(2)(C) of such Code is amended by striking section 223(h) and inserting section 223(g) . (c) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 5. Restoring Lower Penalty for Nonqualified Distributions (a) HSAs Section 223(e)(4)(A) of the Internal Revenue Code of 1986, as amended by section 4, is amended by striking 20 percent and inserting 10 percent . (b) Effective date The amendment made by this section shall apply to distributions made in taxable years beginning after December 31, 2017.