I was caught off guard by all of the recent attention and coverage given to Senator and presidential candidate Bernie Sanders’ positions on immigration. Not because his views were widely discussed (he is running for president, after all), but because the criticisms he was subjected to were often mistaken or even intentionally misleading.

So what did Senator Sanders actually say about immigration? In an interview with Sanders, Vox.com editor Ezra Klein brought up the concept of an “open borders” immigration policy. Sanders rejected the notion—open borders and unlimited immigration, of course, being a position that no elected official supports. Sanders went on to point out—a point which he later reiterated to journalist Jose Antonio Vargas and the Hispanic Chamber of Commerce—that in some cases the importation of new foreign workers can negatively impact the wages of workers in the United States. Note that Sanders didn’t say immigrants are taking jobs or lowering wages. He was specifically referring to non-immigrant, temporary foreign worker programs, also known as “guestworker” programs, which are full of flaws that employers take advantage of to exploit American and migrant workers alike, and to pit them against each other in the labor market.

The reality is that what Sanders supports on immigration is careful and nuanced, and it’s the correct path forward for American immigration policy. In a nutshell, Sanders is strongly in favor of legalization and citizenship for the current unauthorized immigrant population, which will raise wages and lift labor standards for all workers, and he’s against expanding U.S. temporary foreign worker programs, which allow employers to exploit and underpay so-called guestworkers. Limiting guestworker programs will reduce wage suppression and improve labor standards for U.S. and migrant workers alike.

When it comes to the number one priority for immigration reform—legalizing the unauthorized immigrant population in the United States—Sanders has said time and time again that they should be legalized immediately and put on a path to citizenship, and he’s highlighted their contributions to the American economy. Sanders could not be any clearer about this. He voted for the 2013 comprehensive reform bill that would have legalized most of the unauthorized population, despite his misgivings about the large expansion of high- and low-skilled guestworker programs in the bill, which shows the importance he ascribes to legalization. Sanders understands that having eight million people working in the U.S. labor market without labor and employment rights puts downward pressure on the wages and working conditions of all workers. He has not failed to point this out. There’s no question that Sanders’ desire for legalization of the unauthorized population is consistent with his broader agenda to see wages rise for workers in the United States.

Back in June, Politico’s Seung Min Kim wrote a brief history of Sanders’ (supposedly) “complicated” position on immigration, going back to 2007. A few more recent stories include one from Dara Lind at Vox, who wrote that Sanders position “doesn’t easily fit either side of the immigration debate,” and Elise Foley and Daniel Marans at The Huffington Post reported on how some “immigration activists” think Sanders is using GOP talking points on immigration, as well as what Foley and Marans call “a broader tension within the immigrant rights movement that long separated organized labor and allies like Sanders from other center-left and business community stakeholders.”

While some may see this as taking a complicated position or creating a “tension” among immigration reform advocates, I simply see it as Sanders rejecting corporate lobbyists who want to vastly expand and deregulate guestworker programs in order to hire foreign workers who are easily exploited, who can be legally underpaid, and who can rarely speak up about unfair working conditions or unpaid wages. Guestworkers are afraid to advocate for themselves because they often arrive indebted to the labor recruiters who helped them secure their temporary job, and because they know that if they complain on the job—or if they get fired for any reason—they become instantly deportable, which means losing the ability to earn enough to pay back their debts.

There are many recent examples which suggest that the abuses in guestworker programs are not just rare, one-off occurrences that can be explained away by a few bad employers. Low-skilled workers on H-2A and H-2B visas have been beaten and assaulted, raped, starved, kept as captives and subjected to forced labor, and have often been the victims of human trafficking at the hands of labor recruiters and employers. The Southern Poverty Law Center has called the H-2A and H-2B programs “Close to Slavery.” Teachers and high-tech guestworkers on H-1B visas have also been exploited and subjected to debt bondage, and L-1 visa guestworkers have been paid $2 an hour for work that normally pays $19 or $45 an hour. Many employers have used guestworker programs to avoid hiring U.S. workers, or have replaced their existing workforce with guestworkers after first forcing U.S. workers to train their guestworker replacements as a condition of their severance packages. Employers substitute guestworkers for Americans because guestworkers can be legally paid tens of thousands of dollars less than similarly skilled U.S. workers. Young foreign workers in the country on J-1 “cultural exchange” visas have been mistreated and forced to live in filthy basements while being paid $1 an hour, and even coerced into “sex slavery.”

The exploitation inherent in all of these guestworker programs is a feature of them, not a bug. In the case of H-2 visas, for example, the Labor Department said it “found violations in 82% of the H-2 visa employers it investigated in fiscal year 2014.”

Let’s be clear that the migrant workers seeking a better life were not to blame in any these examples; either the employer, a labor recruiter, or a trafficker was at fault. That’s why pointing out what’s wrong with guestworker programs, and demanding reforms to guestworker programs that will protect migrant workers by preventing employer exploitation—as Bernie Sanders does—is absolutely pro-immigrant.

A major aspect of the immigration system is badly broken and needs an overhaul to protect both American and immigrant workers, but some immigration reform advocates nevertheless appear to be in denial about the flaws in these guestworker programs. For example, representatives from United We Dream and the Center for American Progress (and its blog, ThinkProgress), two groups doing great work and tirelessly advocating on behalf of the undocumented population, both harshly criticized Senator Sanders’ recent remarks on guestworker programs.

Their comments are based on the mistaken belief that immigration (or in this case, the importation of non-immigrant workers) can never cause any harm to U.S. wages and working conditions. As the examples of abuse above clearly show, that’s simply not true. In order to fix these well-documented problems, however, we have to be honest about the failings of our immigration laws. If employers are not constrained by laws that require them to adequately pay guestworkers or to treat them fairly and with dignity, guestworkers will continue to end up earning wages that are no better than those of undocumented workers, who are not “legal” immigrants and have no rights in the workplace. And if employers are allowed to replace U.S. tech workers with partly indentured non-immigrant workers hired precisely because they have fewer rights and can be paid $40,000 less, then U.S. workers will suffer.

Two of the best responses to criticisms of Sanders have come from Harold Meyerson in the Washington Post, who explains how Sanders’ position on immigration is consistent with social democratic, progressive values, and from Zaid Jilani at AlterNet who correctly notes that Sanders’ comments on immigration have been “completely twisted,” and that they are certainly not consistent with his actual record on immigration:

Sanders is a son of a Polish Jewish migrant, and has spoken in favor of comprehensive immigration reform and ending detention quotas for undocumented immigrants. He vocally supported President Obama’s immigration executive order and has called for going even further, such as including the parents of dreamers, putting him to the left of President Obama. Sanders voted in favor of 2013’s comprehensive immigration reform bill, the primary piece of legislation immigrant advocates support. In 2003, he had a zero percent rating from the main anti-immigrant advocacy group, FAIR.

Everyone operating in this space should be honest about what immigration is and is not. Immigration is not a magical unemployment cure as some corporate lobbying groups might suggest. Future labor migration flows have great potential to invigorate and add value to the American economy, but only if managed smartly. At a minimum, new workers arriving in the United States must: 1) have adequate worker protections that empower them to stand up for themselves when things go wrong, 2) not be underpaid according to U.S. wage standards, and 3) either arrive in the United States with a permanent immigrant visa (a “green card”) or have the ability to self-petition for a green card after a short provisional period on a temporary visa.

Ignoring the realities that guestworkers face is tantamount to selling out to the corporations that spend millions lobbying for the ability to exploit migrant workers through bigger and bigger guestworker programs with fewer and fewer rules that protect workers and labor standards. Obviously, the Chamber of Commerce, tech firms, agribusiness, and much of corporate America would like all reform advocates to ignore the exploitation of guestworkers so that they can achieve their top immigration reform objective: a steady supply of disposable indentured labor. Reform advocates on the left, right, and center should work together to thwart them by insisting on robust protections and enforceable rights for all future immigrants and guestworkers.