The $21 billion opioid settlement brokered last year between the three largest U.S. pharmaceutical distributors and the attorneys general of 46 states has made it more difficult for some patients to obtain other types of medications, including those for addiction, anxiety and attention deficit hyperactivity disorder, according to The New York Times.

The agreement imposed new requirements on the companies that provide medications to pharmacies. It was designed to correct practices that contributed to the nation’s opioid crisis. Distributors are putting stricter limits on medication supplies to individual pharmacies, and keeping a close eye on their dispensing activity.

The oversight also applies to other medications besides opioids that have the potential to be addictive or habit-forming, including muscle relaxants and Xanax. Tens of thousands of orders have been canceled. The New York Times found many patients have been affected, including college students trying to fill Adderall prescriptions, patients in rural areas who have to drive long distances for medical care and hospice providers relying on local pharmacies for controlled substances.

According to Dr. Emily Wood of the California State Association of Psychiatrists, a survey of California psychiatrists revealed dozens of patients’ stories of unfilled prescriptions as a result of distributor caps on quantities of controlled substances a pharmacy can sell in a month. “Pharmacists aren’t calling the doctors to work it out,” Dr. Wood said. “They’re just not filling the prescriptions.”