Just as it appeared that the latest iteration of the Republican health care bill wouldn't muster enough support to pass the House, new proposed changes earned the support of two critical members.

Republican leaders worked throughout the day to build on that momentum, holding one-on-one meetings to try and convince skeptical House Republicans and measuring whether the changes are enough to get the 216 votes they need to get it passed.

Michigan Rep. Fred Upton, a key Republican who came out against the current bill on Tuesday, now says he supports it thanks to an additional amendment that attempts to protect people with pre-existing conditions.

Upton and Rep. Billy Long, R-Missouri, an ally of President Donald Trump who also came out against the bill this week, emerged from a meeting with the president Wednesday morning saying they are both now on board.

“I support the bill with this amendment that’s going to be included,” said Upton outside the White House.

After the new support and amendment, the NBC News count shows that 19 Republicans remain publicly opposed to the measure. Republicans can only lose 22 members for it to pass. Two dozen members are still undecided.

GOP leaders got another boost Wednesday afternoon when the House passed a compromise budget to fund the government through the rest of this fiscal year. If the Senate passes it and the president signs it, as expected, it will prevent a government shutdown and provides an accomplishment for House leadership to build on.

The previous round of changes to the health care bill by Rep. Tom MacArthur, R-N.J., appealed to conservatives but lost moderates, including Upton, due to concerns that people with pre-existing conditions wouldn’t be protected or would be saddled with unaffordable premiums if states opt out of the current federal mandate to cover people with life-long health problems.

Upton’s amendment would add $8 billion of federal funding over five years to help people with pre-existing conditions cover their increased costs.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I think it adds a little more protections" for people with pre-existing conditions, said Rep. MacArthur. "I think it's good."

White House Press Secretary Sean Spicer insisted that those with pre-existing conditions would be covered at reasonable costs. "We have done every single thing possible" to bring down costs. "The bill covers people with pre-existing conditions," Spicer said. "It does everything to ensure that if a state seeks a waiver, that they are still covered."

Upton's influence can't be understated. The former chair of the House Energy and Commerce committee and wrote several previous bills to repeal the Affordable Care Act and a host of other health care bills that are incorporated into the Republicans’ comprehensive American Health Care Act. Now that he's on board, Republican leaders are hoping he'll pull others with him.

"I feel very good about where we are, we’ve had very productive meetings," said Rep. Patrick McHenry, a deputy whip tasked with counting the votes. "The Upton-Long language, the dynamic duo of Fred and Billy, is additive to the package, helpful to a number members."

But in talking with members who have either been undecided or opposed to the bill, most have maintained their position.

Rep. Jaime Herrera Beutler of Washington, said that she still has concerns, including "making sure we don't leave the most vulnerable populations behind."

She has an amendment to protect children with disabilities, which she said she wants to come up for a vote but hasn't yet been given a commitment from leadership.

Members who remain opposed have other concerns, too. For instance, Rep. Frank LoBiondo of New Jersey, said he's not on board because of the reduction to Medicaid. And Rep. Brian Fitzpatrick of Pennsylvania is looking for more funding for opioid treatment.

Health policy experts and advocacy groups said the additional $8 billion was unlikely to offset costs significantly for people with pre-existing conditions, who could face major premium increases tied to their illness under the new law and whose insurance could potentially cover fewer services than under Obamacare.

“This is a drop in the bucket,” Matthew Fiedler, a fellow at the Brookings Institution's Center for Health Policy, told NBC News.

Under the existing AHCA framework, many at-risk groups, especially older Americans, would also receive less government aid to purchase insurance than under Obamacare, fewer subsidies to cover out-of-pocket costs, and potentially higher premiums tied to their age, which could further complicate their ability to pay for care. The AARP immediately reiterated its opposition to the bill despite the new amendment in a tweet, saying that it would not help the “majority” of people with pre-existing conditions.

Related: Personal Tragedy Drives Deal-Making GOP Congressman on Health Care

Like many of the moderates who are either opposed or leaning against the bill, Upton comes from a more moderate district, and voting for this bill could be politically toxic.

But the legislative yo-yo of writing amendments to appease all corners of a party so starkly divided on health care has its risks. When something is changed to address moderates’ concerns, it risks losing conservatives.

An aide to Rep. Mark Meadows, the chair of the conservative Freedom Caucus that has reluctantly signed on to the bill after being blamed for the original bill's failure, said the 36-member Freedom Caucus will remain supportive even with an additional $8 billion in federal funding.

“As long as there's no policy changes — I think for us it's the flexibility that's the key, giving state the ability to seek the waiver," said Rep. Jim Jordan, a member of the Freedom Caucus who said he'll still support the bill even with the changes. "I don't know if that changes anything for the members of the Freedom Caucus."

And the member-to-member outreach is working. Rep. Tim Murphy of Pennsylvania said he's leaning toward a yes now that leaders said they'd address his concerns about a lack of mental health care.

Republicans who support the bill are trying to hold a vote on it this week, before House members return to their districts for a 12-day recess. There’s widespread recognition that if the House leaves, it will be much more difficult to pass the measure after a week with constituents.