The Optional Practical Training program has been one of the many Band-Aids holding together an immigration system that hasn’t been updated since the early 1990s before the internet became the world economy’s major driver. Now, the Trump administration is moving to eliminate this crucial but imperfect fix.

When it comes to artificial intelligence (AI), America is still on top. A major reason for that? America is quite good at recruiting AI students from around the world and retaining them after they graduate from school. But if certain plans proposed by the White House come to fruition, then that could all change very quickly.

America’s increasingly convoluted and unwelcoming immigration system has put the country’s front-runner status in jeopardy, according to a landmark report from Georgetown University’s Center for Security and Technology (CSET). And, if the Trump administration moves forward with its plan to rescind the Optional Practical Training (OPT) program, then America’s. leadership position in AI will become even more vulnerable.

Rescinding OPT, which allows thousands of international students to work in the United States after graduation, notably undermines President Donald Trump’s own plan to protect America’s AI advantage. More than two hundred thousand people are brought into the American workforce each year through the OPT program. Roughly two-thirds of them hold the sorely-needed advanced graduate and Ph.D. degrees that AI relies on.

If they’re gone, then America’s workforce has a problem. After all, domestic interest in these fields remains woefully insufficient to meet the spike in employer demand for AI workers.

These kinds of labor shortages can’t be taken lightly, given the beneficial impact AI has on American lives. “AI is improving a vast and diverse range of industries including healthcare, entertainment, auto manufacturing, social media, finance, and many, many more,” Matthew Feeney, the Cato Institute’s Director of Emerging Technologies, told me. In fact, the OPT program helps ameliorate talent gaps that may otherwise see that crucial progress grind to a halt.

Right now, OPT offers graduates in science, technology, engineering, and mathematics (STEM) the chance to work in the United States for up to three years after graduation. There’s no limit to the number of people who can participate in the program, and, while working, many of these folks hope to nab an H-1B visa, which can give them an additional six years of U.S. employment. Firms can also sponsor their H-1B workers for green cards, making it one of the few viable ways that foreign students can gain permanent residency.

But the H-1B visa is subject to strict numerical limits. In fact, for every year since 2015, the number of H-1B applications the U.S. government received was more than double that of the eighty-five thousand visas available. The executive branch has dealt with this excess in applications by awarding visas through a lottery system. Since an applicant may not get an H-1B visa on their first try, the OPT program allows them to re-apply for a second and third year while they maintain their authorization to work in the United States.

As such, the OPT program is treated as a “waiting room” of sorts for immigrant hopefuls. An applicant may not get an H-1B visa on their first try, but OPT allows STEM graduates, including those in AI-related fields, to keep working in the United States as they reapply the next year and, if they’re still unlucky, the year after.

By the end of August, that could all come to a crashing halt. The Trump administration is slated to curtail the program—even possibly dismantling it altogether.

Even if Trump chooses not to do so, the program still faces challenges in court. In Washington Alliance of Technology Workers v. U.S. Department of Homeland Security, et. al, a union of U.S. tech workers have argued that OPT harms Americans by forcing them to compete with foreigners for the same employment opportunities.

Extensive research on the program, however, shows that this simply isn’t the case. According to a study by Jeremy Neufeld of the Niskanen Center, for every ten OPT workers in a given locality, American wages increase by an average of at least $2—and five patents get added to that area. “OPT recipients are highly educated and motivated by the desire to prove themselves,” says Neufeld. “They even make the people around them and the teams they’re on more productive, increasing innovation and raising the earnings of similarly educated natives.”

The OPT program is under fire from both the executive and legislative branches, so it’s up to Congress to make certain that America continues to be an attractive place for AI graduates to build their futures. For starters, lawmakers could consider codifying OPT into law, so that the program’s fate no longer rests on executive discretion. Congress should also examine solutions such as extending the H-1B cap exemptions that many nonprofit and governmental organizations already enjoy and ending green card restrictions that would keep some applicants waiting in line for over one hundred years.

The OPT program has been one of the many Band-Aids holding together an immigration system that hasn’t been updated since the early 1990s before the internet became the world economy’s major driver. The Trump administration is moving to eliminate this crucial but imperfect fix. But Congress can use this opportunity to make lasting changes—reforms that recognize America’s desperate need to increase and keep the AI talent Trump said he wanted.

Sam Peak is a Tech and Innovation Fellow for Young Voices and a policy associate at Americans for Prosperity. The views expressed in this column don’t necessarily reflect those of the organizations with which the author is affiliated.