While greatly improved from its original rollout, which was both severely criticized and then stayed by several different judges, including three on the U.S. Ninth Circuit, President Donald Trump’s new executive order concerning immigration may still have what could prove to be a fatal flaw.

Let’s begin with the good in it: three important changes – a significant downsizing – largely designed to bulletproof it against anticipated legal attacks.

FIRST, the new order no longer applies to permanent legal residents, nor to foreigners legally in the country with a valid visa. This is crucial, because, under the Plenary Power Doctrine, many of the protections of the U.S. Constitution do not apply to foreigners in other countries, but they do apply to people who are already here.

Thus, people already here, even illegally, are still entitled to protection against unreasonable searches and seizures, against compelled confessions, etc. So, if included under the new order, they would also be able to raise plausible claims about denial of Due Process, denial of Equal Protection (e.g., discrimination on the basis of religion), etc. – claims foreigners in foreign countries cannot validly raise under the Plenery Power Doctrine.

SECOND, the new order no longer applies to the estimated 60,000 people in foreign countries who have already been issued a visa. This could help insure the new order’s legal survival in at least two different ways.

For one thing, it would avoid what many see as the disastrously unfair impact the first order had, affecting people who were literally already in the air or sitting on airplanes ready to take off, people who had quit their jobs and/or sold their homes because they had a visa but had not yet reached the airport, etc.

Moreover, any attempt to distinguish in a new executive order between classes of people who already held visas – so that only some would be revoked, and others would not be – could easily be seen as arbitrary and capricious.

In addition, it is generally harder to legally justify taking from a person something he already has (e.g., a job) than to deny giving him the same benefit in the future.

So, regardless of other constitutional arguments, the new order avoids claims people might wish to assert based upon the fact that they already possessed a valid visa, especially if they can show that they have already acted in justifiable reliance upon it.

THIRD, the new order eliminates a provision which would have given preference to refugees who were members of religious minorities. Since this was seen by many as providing a special benefit to refugees who were Christian, arguably at the expense of Muslim refugees, it could be seen as favoring one religion over another.

HOWEVER, like the original one, the new executive order still targets, and singles out for special treatment, people who are from only majority-Muslim countries. This gave rise to claims under the original order of illegal discrimination based upon religion.

Indeed, a federal judge in Virginia, noting this fact, and anti-Muslim comments made by several people before the original executive order was issued, called it “unrebutted evidence” that the order might illegally discriminate on the basis of religion.

Other judges who reviewed the order likewise expressed concern that only countries which are majority-Muslim are named, thereby suggesting possible illegality. All of this could prove decisive if not fatal if judges are led to believe – based in whole or in part on this one fact – that the plan is designed to discriminate on the basis of religion and not to protect national security.

So the question remains, with so much at stake – not only the short-term effect during the brief period of time necessary to develop new vetting procedures, but also the long-term effect on the President’s power for the next four or even eight years to take decisive action regarding immigration without having to go through Congress – why take a big chance by targeting only majority-Muslim countries?

Even if one believes very strongly that such targeting would be constitutional – for example, under the Plenary Power Doctrine – why not fix the problem, especially if it can be fixed very easily? If I as a lawyer thought I had a strong case, but a judge even suggested a possible weakness or problem, I would do everything possible to make a change, especially if it was easy to do and there were no downside costs or risks.

Adding even one non-majority-Muslim country – for example North Korea – would significantly help to undercut the legal argument that the new order is simply part of a illegal vendetta against Muslims. Actually, there is clear legal precedent for including non-majority-Muslim countries in policies aimed at reducing terrorism.

For example, at one point the Transportation Security Administration [TSA] automatically singled out for secondary screening all persons with passports from twelve countries. These included not only many majority-Muslim countries, but also two non-Muslim countries: Cuba and North Korea.

Similarly, the National Security Entry-Exit Registration System [NSEERS], which was initiated as a direct response to the 9/11 attacks by Muslims, required registration and reporting by male visitors from 25 countries, including one which was not majority-Muslim.

It certainly would not be hard to justify adding even a few more countries to the list of those singled out as posing an enhanced risk of terrorism.

One of the major arguments for including the original seven majority-Muslim countries, and not many other countries in the region, is that their weak and ineffective governments mean that identity documents are very easily forged, there often are no reliable official records to be used in the vetting process, and thus effective vetting is very difficult if not almost impossible.

But exactly the same argument can be made about several war-torn non-majority-Muslim countries such as the South Sudan and the Central African Republic. Adding those two countries, in addition to North Korea, would further undercut any argument that only majority-Muslim countries are being targeted, and targeted invidiously for religious reasons. Moreover, adding these countries is unlikely to add to the protests in the streets or at the airports, or hurt our tourist industry.

So one must ask why the President would risk even additional temporary delays – from preliminary injunctions or other related legal problems – in curing immigration the President considers very dangerous, and protracted litigation which in the end could lead to a decision holding any such order unconstitutional, when this problem could be so easily corrected.

John F. Banzhaf III is a professor of public interest law at the George Washington University Law School.

This is an opinion piece. The views expressed in this article are those of just the author.