As part of his “America First” campaign, President Trump has set his sights on the H-1B program, in which temporary visas are granted to foreign workers with college degrees and “highly specialized knowledge,” so that they can fill gaps in the U.S. workforce. The tech industry is a big supporter of the H-1B program, claiming that there’s a shortage of workers with in-demand tech skills. Hiring these foreign workers, the industry says, is good for the economy because it helps the tech industry thrive.

Trump has long been critical of the program, saying it takes jobs from Americans and drives down salaries for tech workers. In mid-April he signed an executive order calling for reform of the H-1B visa process, which admits tens of thousands of foreign workers a year via a lottery system. The order aims to crack down on fraud and abuse and would require that visa applicants and their employers prove that only “the most highly skilled workers” in their fields could receive H-1B visas.

As a candidate, Trump had vowed to ban the program, so the executive order wasn’t a surprise. It doesn’t affect the most recent H-1B lottery.

The tech industry isn’t pleased with Trump’s action and wants the system to stay essentially as is, arguing that the so-called reform will only make it harder to find the tech workers they need, if they can find them at all. Robert D. Atkinson, president of the Information Technology and Innovation Foundation, which is funded by tech companies, said after Trump issued his order, “Some of the ideas that have been suggested, such as requiring applicants to advertise job openings for an extended period of time to prove conclusively that no U.S. workers are available, could be so onerous that it renders the program ineffective. We are talking about fast-moving industries. Companies get opportunities, and they have to jump on them. Delaying them for too long would be bad for innovation, job creation and growth.”

This is one instance in which Trump is on the right track, and the tech industry off it. The H-1B program doesn’t operate the way that Atkinson claims it does, and it is rife with abuse. Big outsourcing companies game the system by flooding it with thousands of applications so they receive all the visas they want, while smaller companies, many of which desperately need highly skilled workers, are left out in the cold. Critics of the program say that foreign workers are paid much less than their U.S. counterparts, and so the program is also a way for tech companies to reduce their costs, while Americans lose their jobs.

In a briefing with the press about Trump’s executive order, a senior administration official claimed that about “80 percent of H-1B workers are paid less than the median wage in their fields.” The official claimed that the top three recipients of the visas were the outsourcing firms Tata Consultancy Services,Infosys and Cognizant, which the official said pay their H-1B employees between $60,000 and $65,000 a year, compared to the $150,000 a year the official said was the median wage of a Silicon Valley engineer.

[ Discuss this story. Join our H-1B/Outsourcing group on Facebook. ]

Ronil Hira, a professor at Howard University who has studied the visa program, agrees. He told The New York Times, “The H-1B program is critical as a way for employers to fill skill gaps and for really talented people to come to the United States. But the outsourcing companies are squeezing out legitimate users of the program. The H-1Bs are actually pushing jobs offshore.”

In testimony before the Senate Judiciary Committee, he said that in his analysis of the 2013 H-1B lottery, the top nine H-1B employers were all outsourcing firms, many of which replaced U.S. workers with H-1B employees and ultimately sent the jobs offshore.

In one of the more egregious abuses of the program, the Times reported, Tata Consultancy Services used H-1B workers to watch how Toys R Us accountants did their jobs, ultimately leading to the jobs moving overseas. As one example, the newspaper reported that an H-1B visa employee sat next to a Toys R Us accountant and “studied and recorded the accountant’s every keystroke, taking screen shots of her computer and detailed notes on how she issued payments for toys sold in the company’s megastores.” Based on that, the newspaper said, H-1B employees created a detailed manual about how Toys R Us accountants work. They then trained accountants in India to do the jobs at much less cost, and the U.S. Toys R Us accountants were laid off.

That’s just one of many similar stories. Lawsuits have been filed, including against Disney, for similar alleged abuses.

This isn’t a partisan issue. Senate Judiciary Committee Chairman Chuck Grassley and Senate Minority Whip Dick Durbin have been filing legislation for 10 years to reform the program, to no avail. In early January they once again filed a bill to reform it. Durbin even argues that Trump’s actions are “guarded and timid. … It’s too little, too late.”

The U.S. should do everything it can to attract and retain the world’s best tech talent, no matter where it’s found, and open its borders to it. But that’s no longer what the H-1B program does. It’s become a corrupt program that helps outsource American jobs, takes work away from qualified technologists, and doesn’t do enough to help the country get the top-notch talent it needs. Tech companies should join with Grassley, Durbin and Trump and reform the program so it does right for U.S. workers, U.S. innovation and U.S. tech dominance.