; (B) in subparagraph (E), by striking the period at the end and inserting ; or ; and (C) by adding at the end the following: (F) section 514, 515, or 538 of the Housing Act of 1949 ( 42 U.S.C. 1484 , 1485, 1490p). ; and (2) in paragraph (10)— (A) by striking means the Secretary and inserting the following: means— (A) the Secretary ; (B) in subparagraph (A), as so designated, by striking the period at the end and inserting , with respect to a multifamily mortgage described in subparagraph (A), (B), (C), (D), or (E) of paragraph (2); and ; and (C) by adding at the end the following: (B) the Secretary of Agriculture, with respect to a multifamily mortgage described in paragraph (2)(F). . (b) Preservation of contract Section 521(d) of the Housing Act of 1949 ( 42 U.S.C. 1490a(d) ) is amended by adding at the end the following: (3) Notwithstanding any other provision of law in managing and disposing of any multifamily property that is owned or has a mortgage held by the Secretary, and during the process of foreclosure on any property with a contract for rental assistance under this section— (A) the Secretary shall maintain any rental assistance payments that are attached to any dwelling units in the property; and (B) the rental assistance contract may be used to provide further assistance to existing projects under 514, 515, or 516. . 102. Study on rural housing loans for housing for low- and moderate-income families Not later than 6 months after the date of enactment of this Act, the Secretary of Agriculture shall conduct a study and submit to Congress a publicly available report on the loan program under section 521 of the Housing Act of 1949 ( 42 U.S.C. 1490a ), including— (1) the total amount provided by the Secretary in subsidies under such section 521 to borrowers with loans made pursuant to section 502 of such Act ( 42 U.S.C. 1472 ); (2) how much of the subsidies described in paragraph (1) are being recaptured