A unanimous Supreme Court on Thursday struck down a ruling by the U.S. Court of Appeals for the 9th Circuit that had overturned the conviction of a woman accused of profiting from illegal immigration.

What’s more, Justice Ruth Bader Ginsburg rebuked the historically liberal 9th Circuit, writing in the court’s opinion that the 9th Circuit had “departed … drastically” from legal precedent in its ruling last year.

A federal court in California convicted a woman of several felonies for profiting from filing illegal immigration documents with the U.S. Department of Labor on behalf of workers in the home health care industry.

A three-judge panel of the 9th Circuit threw out some of felonies, arguing that a federal law barring financial gain criminalizes the free speech and petition clause of the First Amendment.

In the opinion released Thursday, Justice Ginsberg noted that the free speech and petition claims were never raised by the woman but by witnesses assembled by the 9th Circuit panel who “projected that [the federal law] might over a wide swath of protected speech, including political advocacy, legal advice, even a grandmother’s plea to her alien grandchild to remain in the United States.”

“No extraordinary circumstances justified the panel’s takeover of the appeal,” Justice Ginsburg wrote for the court.

In a concurring opinion, Justice Clarence Thomas called for a broader review of the “void-for-vagueness” doctrine, which he said has been used to invalidate an Alabama law against picketing, abortion bans and animal cruelty statutes.