Last year California passed a new law, known generally as AB5, designed to classify independent contractors as full employees, a status that brings associated protections under California law. The law was designed to go after Uber and Lyft, whose business model depends on drivers working as independent contractors, but it was too broad in scope, threatening to drag in workers and business far from the tech-enabled “gig work” economy.

AB5 took effect on January 1, and it’s already causing trouble. A limit on the number of articles that freelance writers could produce for one publication resulted in layoffs for some California journalists and a First Amendment lawsuit from others. Workers in more than 135 occupations claim that losing contractor status hurts them, while independent theater and arts groups are facing thousands of dollars in costs they can’t afford because they must now treat staff as employees. Lorena Gonzalez, the assemblywoman who wrote AB5, has introduced another law to remove the article cap for writers and address the status of musicians. A sign of poor legislation is the need to rewrite it immediately after it takes effect.

Uber is making changes to its app to avoid triggers that define “employment” under the law. If this workaround proves successful, then the industry that AB5 targeted will remain untouched, while other businesses will face its burdens—and other workers will lose opportunities. Trucking companies have gotten a restraining order on applying the law to their operations. The process of negotiating exemptions and modifications to the law is making progressive California a bastion of crony capitalism, with favored or powerful classes writing themselves in or out of regulation. Poorer workers and smaller companies and industries, without access to lawyers or lobbyists, will lose out. In this vein, Uber, Lyft, DoorDash, and others are planning to spend more than $100 million on a ballot measure to overturn AB5—but only for app-based drivers, leaving everyone else, from translators to rehab assistants, out in the cold.

California should stop the madness, repeal AB5, and craft a law narrowly tailored to the gig economy but broadly applied without exemptions. Uber and Lyft drivers, or movers for companies like Lugg, are neither true contractors, like architects, nor true employees, like factory workers. A better approach might include them in payroll-tax benefits such as disability and unemployment and exclude them from minimum-wage and overtime regulations, since they choose how much they will work. There would be questions to resolve—if you quit moving for Lugg after hurting your back but occasionally drive for Lyft, are you unemployed?—but such a compromise could spare Uber and Lyft the expense and risk of a ballot measure, while saving California the ignominy of aiming regulations at multibillion-dollar corporations but hitting community theater instead.

Photo by Mario Tama/Getty Images