(C) and inserting , and , and by inserting after subparagraph (C) the following new subparagraph: (D) except as may be otherwise provided by regulations, in the case of amounts described in subparagraph (A)(iv), such amounts will be distributed only in the form of a qualified distribution (as defined in section 401(a)(38)(B)(i)) or a qualified plan distribution annuity contract (as defined in section 401(a)(38)(B)(iv)). . (e) Effective date The amendments made by this section shall apply to plan years beginning after December 31, 2018. 107. Treatment of custodial accounts on termination of section 403(b) plans (a) In general Section 403(b)(7) of the Internal Revenue Code of 1986 is amended by adding at the end the following: (D) Treatment of custodial account upon plan termination (i) In general If— (I) an employer terminates the plan under which amounts are contributed to a custodial account under subparagraph (A), and (II) the person holding the assets of the account has demonstrated to the satisfaction of the Secretary under section 408(a)(2) that the person is qualified to be a trustee of an individual retirement plan, then, as of the date of the termination, the custodial account shall be deemed to be an individual retirement plan for purposes of this title. (ii) Treatment as Roth IRA Any custodial account treated as an individual retirement plan under clause (i) shall be treated as a Roth IRA only if the custodial account was a designated Roth account. . (b) Effective date The amendment made by this section shall apply to plan terminations occurring after December 31, 2018. 108. Clarification of retirement income account rules relating to church-controlled organizations (a) In general Section 403(b)(9)(B) of the Internal Revenue Code of 1986 is amended by inserting (including an employee described in section 414(e)(3)(B)) after employee described in paragraph (1) . (b) Effective date The amendment made by this section shall apply to plan years beginning after December 31, 2008. 109. Exemption from required