After a chaotic day of negotiations between Congress and the White House over immigration and averting a government shutdown next week, President Donald Trump took to Twitter, potentially blowing up negotiations even further.

He blamed Democrats for their “intent on having people and drugs pour into our country.”

The Democrats seem intent on having people and drugs pour into our country from the Southern Border, risking thousands of lives in the process. It is my duty to protect the lives and safety of all Americans. We must build a Great Wall, think Merit and end Lottery & Chain. USA! — Donald J. Trump (@realDonaldTrump) January 12, 2018

But despite the president’s efforts to escalate partisan rancor over immigration negotiations, Sen. Jeff Flake (R-AZ), who has taken a central role in finding a bipartisan solution to the sunsetting Deferred Action for Childhood Arrivals (DACA) program, had a history lesson for Trump.

I’ve served with “The Democrats” for 17 years, and not one has ever been intent on “having people and drugs pour into our country”. https://t.co/8yyRogju3Y — Jeff Flake (@JeffFlake) January 12, 2018

Trump rejected a bipartisan proposal — an effort led by Flake and Sen. Lindsey Graham (R-SC) — Thursday that would have given DREAMers a chance at legal status and a path to citizenship, while restricting them from sponsoring their parents, eliminating the diversity visa lottery, and funding some border projects.

Trump’s issue with the proposal: “Why are we having all these people from shithole countries come here?” He reportedly asked lawmakers yesterday, referencing immigrants from Haiti, El Salvador, and African nations, according to the Washington Post.

“My ancestors came from countries not nearly as prosperous as the one we live in today. I’m glad that they were welcomed here,” Flake tweeted in response.

Democrats and Republicans are trying to come to an agreement by the end of next week on what to do about the 690,000 unauthorized immigrants who are losing or set to lose their deportation protections under the DACA program. Congress has to come up with a deal to keep the government open in the next eight days, a deadline that has managed to escalate movement and action on DACA. But so far, it has yet to produce a proposal that has the blessing of Congress and the White House — and Trump isn’t making negotiations any easier.

Trump is wrong about what the bipartisan agreement proposes

Trump denounced the bipartisan proposal in a five-tweet tirade Friday morning, calling it a “big step backwards.”

His qualms with the bill boil down to two points — neither of which are consistent with his past claims, or what the proposal includes:

Trump says the wall is not “properly funded.”

Trump claims the agreement loosens policies around “chain migration,” or family-based immigration, and the diversity visa lottery system, forcing the US to take “large numbers of people from high crime countries which are doing badly.”

The so-called bipartisan DACA deal presented yesterday to myself and a group of Republican Senators and Congressmen was a big step backwards. Wall was not properly funded, Chain & Lottery were made worse and USA would be forced to take large numbers of people from high crime..... — Donald J. Trump (@realDonaldTrump) January 12, 2018

....countries which are doing badly. I want a merit based system of immigration and people who will help take our country to the next level. I want safety and security for our people. I want to stop the massive inflow of drugs. I want to fund our military, not do a Dem defund.... — Donald J. Trump (@realDonaldTrump) January 12, 2018

Trump’s issues with the agreement aren’t based in facts.

As of Thursday, the proposal reportedly included $1.6 billion for physical barriers and another $1.2 billion for “other priorities” on border security, in line with the White House’s requests for a single year of border wall funding in 2017. Of course the actual cost of the wall would be much higher — but funding the entirety of the project has not ever been on the table.

The proposal addresses “chain migration” by making parents of DREAMers ineligible for green cards and making it impossible for them to naturalize, and it would not force an influx of new immigrants. The policy actually throws out the visa lottery system. It reallocates the 50,000 visas under that program to either immigrants already living in the country with expiring temporary legal status, or to immigrants from underrepresented countries on some nonlottery basis.

Despite not having Trump’s sign-off, the bipartisan group negotiating the agreement is pushing forward.

Trump has changed his mind since Tuesday about what sort of bill he’d sign

By all accounts, the proposal Trump rejected on Thursday is in line with the required parameters he charged Congress to address. But Trump, who has never had a clear vision on immigration, other than forcing Congress’s hand on the issue, has changed his mind on what he wants.

The language used by me at the DACA meeting was tough, but this was not the language used. What was really tough was the outlandish proposal made - a big setback for DACA! — Donald J. Trump (@realDonaldTrump) January 12, 2018

If anything, Trump’s bipartisan meeting on DACA Tuesday was tough to understand. He said he’d be open to a DACA bill with no strings attached, defining that as “a DACA bill, but we take care of the 800,000 people ... but I think, to me, a clean bill is a bill of DACA, we take care of them, and we also take care of security,” the president said.

Trump even said he would “like” to pass a “clean” DACA bill first, and do “comprehensive immigration reform” as part of a “phase two” — a proposal that was received poorly by conservative lawmakers.

It’s now clear Trump’s Tuesday statements will have no bearing on what kind of bill he is prepared to sign.

Despite being amenable to Democratic voices earlier this week, the White House continues to engage immigration hardliners who are ideologically closer to the anti-immigration platform Trump ran on in 2016 and the views espoused by his top advisers.

But a DACA bill needs 60 votes in the Senate, meaning at least nine Democrats have to sign on. As long as Trump humors the voices uninterested in compromise, there will be no deal.