The California legislature scrambled this week to correct a serious error that had been written into the state’s new medical marijuana regulations.

The State Assembly passed AB 21, a bill that fixes what may have been a fatal problem with the language of last year’s Medical Marijuana Regulation and Safety Act, by a unanimous vote of 65-0 on Thursday, according to the San Francisco Chronicle. The bill had cleared the state Senate on Monday, and now awaits Gov. Jerry Brown’s signature.

AB 21 removes a March 1 deadline for cities to implement their own medical marijuana regulations. The tight deadline reportedly caused many cities to ban the cultivation of medical marijuana outright, but lawmakers had not intended to set a deadline when drafting the legislation late last year.

In September, Brown signed into law a trio of bills that set up California’s first statewide system for the cultivation, distribution, sale and taxation of medical marijuana, though the laws will not be fully implemented until 2018. The laws established the Bureau of Medical Marijuana Regulation, which will supervise everything from marijuana farms and medical dispensaries to product safety labs and sales.

The legislation was meant to stabilize the state’s medical marijuana industry, which had remained underregulated for nearly two decades after the passage of Proposition 215 in 1996.

CalCann Holdings Inc. partner Aaron Herzberg told the Chronicle that the new regulations would be “meaningless” if cities opted to ban cultivation to avoid running up against the March 1 deadline.

“Now that cities are no longer under the gun, I am hopeful that cities will adopt a more thoughtful approach,” he told the paper.

AB 21 is reportedly classified as an “urgency bill,” meaning it will take effect the moment Brown signs it.

The fix for California’s medical marijuana industry comes months before state voters could legalize marijuana for recreational use. A number of measures that would fully legalize marijuana in California have been cleared to collect signatures, but none so far have qualified for placement on the 2016 ballot.