receiving certain energy benefits (a) New energy efficient home credit Subsection (e) of section 45L of the Internal Revenue Code of 1986 is amended— (1) by striking adjustment .—For purposes and inserting “ adjustment .— (1) In general For purposes , and (2) by adding at the end the following new paragraph: (2) Exception for affordable housing properties Paragraph (1) shall not apply for purposes of determining eligible basis under section 42. . (b) Energy efficient commercial buildings deduction Subsection (e) of section 179D of the Internal Revenue Code of 1986 is amended— (1) by striking reduction .—For purposes and inserting “ reduction .— (1) In general For purposes , and (2) by adding at the end the following new paragraph: (2) Exception for affordable housing properties Paragraph (1) shall not apply for purposes of determining eligible basis under section 42. . (c) Energy credit Paragraph (3) of section 50(c) of the Internal Revenue Code of 1986 is amended— (1) by striking and at the end of subparagraph (A), (2) by striking the period at the end of subparagraph (B) and inserting , and , and (3) by adding at the end the following new subparagraph: (C) paragraph (1) shall not apply for purposes of determining eligible basis under section 42. . (d) Effective date The amendments made by this section shall apply to buildings which receive allocations of housing credit dollar amount or, in the case of projects financed by tax-exempt bonds as described in section 42(h)(4) of the Internal Revenue Code of 1986, which receive a determination of housing credit dollar amount, after the date of the enactment of this Act. 312. Restriction of planned foreclosures (a) In general Subclause (I) of section 42(h)(6)(E)(i) of the Internal Revenue Code of 1986 is amended to read as follows: (I) on the 61st day after the taxpayer (or a successor in interest) provides notice to the Secretary and the housing credit agency that the building has been acquired by foreclosure (or instrument in lieu of foreclosure) and that the