After California got rid of the personal belief exemption for vaccinations, medical exemptions for vaccinations went up, say researchers studying the public health effects of a California Senate bill. Though total exemptions still went down, the findings suggest that the bill isn’t as strong as was hoped, since anti-vaxxers were still able to find doctors willing to provide a medical exemption instead.

The measles, mumps, and rubella vaccine is typically required to attend schools. In 2015, California passed Senate Bill 277, which mandated that parents couldn’t claim personal belief as a reason not to vaccinate a kid. Instead, they’d have to get a medical exemption. Using data from the California Department of Public Health’s yearly Kindergarten Immunization Assessment reports, researchers at the University of North Carolina-Chapel Hill found that in the first year after the bill, medical exemptions went up while, predictably, personal belief exemptions went down. Notably, medical exemptions went up most in the areas that previously had the most personal belief exemptions. The findings were published today in the Journal of the American Medical Association.

In the past, you could only get a medical exemption if vaccines were determined to be actively harmful because of some other issue. For example, if a child’s immune system is very weak, getting vaccinated might be dangerous. Medical exemptions were harder to get because they required a written explanation from a doctor. But SB 277 created a compromise: though it banned personal belief exemptions, it gave more leeway to physicians allowing medical exemptions. Now, for example, a doctor could give one because of family history.

In the two decades before the bill, the number of kindergarteners with medical exemptions didn’t change much, though personal belief exemptions increased, likely because of a growing, though scientifically disproven, belief that vaccination causes autism. As a result, vaccination rates are dropping, and there have been outbreaks. (Notably, Minnesota has grappled with 73 cases this year.)

Under the bill, the medical exemption percentage grew from 0.17 percent to 0.51 percent between 2015 and 2016, while personal belief exemption fell from 2.37 percent to 0.56 percent in the same period. Total exemption percentage fell from 2.54 percent in 2015 to 1.06 percent.

As with all studies, there are limitations. For one, it’s possible that because medical exemptions are harder to get, children who needed them might have gotten a personal belief exemption just to save some hassle. And the scientists didn’t have enough data to know the specific reasons for each medical exemption.

Vaccination is a group effort. If enough people are vaccinated, they develop a type of “herd immunity” that protects even those who aren’t vaccinated — and sometimes these are children that really can’t be vaccinated because of health issues. Though religious and philosophical exemptions have received a lot of criticism for allowing people to opt out, the new study shows that encouraging vaccination isn’t as easy as banning these and there may be other ways for the truly determined to get around the rules.