Just hours before coverage was set to lapse for thousands of homeowners, the Senate approved a bill Tuesday to keep the National Flood Insurance Program operating for four more months. President Donald Trump is expected to sign the bill—which cleared the House last week—into law before midnight Tuesday, when the program expires.

“We applaud lawmakers for taking this needed action to prevent disruptions to closings in thousands of communities across the country,” Elizabeth Mendenhall, president of the National Association of REALTORS®, said in a statement. “Although the program is now extended through Nov. 30, the NFIP is in desperate need of reforms that will make the program solvent and sustainable for the long-term. The National Association of REALTORS® will continue fighting for these reforms.”

The NFIP provides critical flood insurance to homeowners in more than 22,000 communities nationwide, but Congress has wrestled for years with proposals to reform the program, which remains on shaky financial footing.