President Donald Trump has not yet agreed to sign off on a bipartisan compromise that would avert another partial government shutdown without providing all the border wall funding he sought, but some Republicans say the deal is better for the president than it may have initially sounded.

“It’s hard to say definitively whether or not the president is going to sign it until we know everything that’s in it,” White House Press Secretary Sarah Sanders told reporters Wednesday morning. “Unlike Nancy Pelosi we actually like to read legislation before we agree to it. The president isn’t fully happy, as he said yesterday, with everything that’s in the legislation, but there are some positive pieces of it.”

A bipartisan conference committee announced an agreement in principle Monday night, and lawmakers were anxiously awaiting final text of a deal Wednesday with a Friday night deadline looming. Based on the details released so far, members of both parties said it appeared to be a fair compromise.

“In the end, neither side gets everything it wants, but you don’t let the perfect be the enemy of the good,” said Rep. Sanford Bishop, D-Ga.

The agreement falls far short of the $5.7 billion Trump originally demanded for the border wall, offering about $1.375 billion for 55 miles of new bollard fencing. Trump and his critics will likely disagree on whether that constitutes “building the wall,” but some Republicans see it as a victory.

“This is a good compromise,” said Rep. Rodney Davis, R-Ill. “This is over a billion more than Nancy Pelosi said she was going to allow the president to spend on a border structure.”

Pelosi said during negotiations last month she would not approve one dollar to pay for Trump’s border wall, which she branded “an immorality.” On Wednesday, Pelosi retweeted Rep. Nita Lowey, D-N.Y., a member of the conference committee, who called the agreement “the best possible deal to #KeepGovernmentOpen and working for the American people.”

The legislation being finalized Wednesday morning would provide funding for the rest of the fiscal year for the Department of Homeland Security and several other agencies, impacting about 800,000 federal workers who recently went without pay during a five-week partial shutdown.

Republicans stressed the compromise includes additional border security funds for other measures to supplement the fences.

“We want to make sure we’re comparing apples to apples in the president’s number,” said Rep. Will Hurd, R-Texas. “When he was talking about physical barriers, he was also including technical means and technology in between ports of entry as well.”

According to Rep. Markwayne Mullin, R-Okla., the deal contains $1.7 billion for technology, including $805 million to screen vehicles for contraband at ports of entry.

“If you think about it, 40 percent of our fiscal year is completed,” he said. “You’re getting almost half of what the president asked for. Its not perfect but its better than a continuing resolution.”

Although Trump said Tuesday he was not happy with the agreement, he appeared to have warmed up to it after meeting with Senate Appropriations Committee Chairman Richard Shelby, R-Ala., to discuss the details.

“I want to thank all Republicans for the work you have done in dealing with the Radical Left on Border Security. Not an easy task, but the Wall is being built and will be a great achievement and contributor toward life and safety within our Country!” he tweeted Tuesday night.

At the White House Wednesday, Trump accused Democrats of being “stingy” with wall funding but he highlighted the increase in total border security spending. Even if he signs the bill, the White House has indicated he may still declare a national emergency to obtain more funds for border wall construction.

Democrats pointed out what appropriators ultimately agreed on for the border fencing was not far from the $1.3 billion Congress had been prepared to approve in December, but Sanders dismissed that argument as “disingenuous.”

Some Republicans remained unconvinced.

“Only in Washington, DC can we start out with needing $25 billion for border security measures and expect applause when we come up with $1.37 billion. Once again, Congress is not doing its job,” tweeted Rep. Mark Meadows, R-N.C., a Trump ally and chairman of the conservative Freedom Caucus.

Not all Democrats were thrilled with concessions their side made either. Democrats had sought unsuccessfully to limit Immigration and Customs Enforcement’s capacity to detain undocumented immigrants inside the country, claiming a restriction on detention beds would force the agency to focus its resources on the most dangerous and violent criminals. Republicans warned tying ICE’s hands would put the public at risk.

As leadership worked to resolve some last-minute disputes Wednesday over back pay for federal contractors and the extension of the Violence Against Women Act, members of both parties seemed confident something will reach the president’s desk for a signature by midnight Friday because a compromise is better than the alternative of letting a quarter of the government shut down again.

Trump agreed it would be preferable to avert another shutdown, but he insisted there was some benefit from the first one.

“A shutdown would be a terrible thing,” he told reporters in the Oval Office. “I think a point was made with the last shutdown; people realized how bad the border is, how unsafe the border is. I think a lot of good points were made, but I don’t want to see another one—there’s no reason for it.”