Attempting to navigate a legal gray area, immigrants who register to vote often end up being deported, according to a New York Times report. Legal residents—those with a green card who aren’t yet citizens—can lose their right to work and even get kicked out of the country if they vote, as many mistakenly think they’re expected to do. Making matters even more confusing, however, there are some municipalities that do enfranchise permanent legal residents. Some applying for U.S. citizenship proudly tout their voting records on their application, unaware that doing what they thought was their civic duty was illegal. Immigrant-rights groups say these people are not trying to gain anything personally by voting—they’re confused. But the Heritage Foundation says illegal voting could disenfranchise citizens, and may be more widespread than authorities realize.