the Secretary determines that a maturing loan for a project cannot reasonably be restructured in accordance with subsection (c) and the project was operating with rental assistance under section 521, the Secretary may renew the rental assistance contract, notwithstanding any provision of section 521, for a term, subject to annual appropriations, of at least 10 years but not more than 20 years. (2) Rents Any agreement to extend the term of the rental assistance contract under section 521 for a project shall obligate the owner to continue to maintain the project as decent, safe, and sanitary housing and to operate the development in accordance with this title, except that rents shall be based on the lesser of— (A) the budget-based needs of the project