A new audit has exposed several weaknesses in the Minnesota Department of Health’s management of the state’s medical cannabis program.

Internal controls were rated “generally not adequate” in a number of areas, sparking consternation among patients across the state. The audit found that officials did not take the necessary steps to ensure manufacturers have a formal contract with a testing lab, while they were also unable to guarantee accurate testing and seed-to-sale tracking before sales were made.

It found that officials have kept sloppy records and said they need to improve their oversight of the growing program.

Minnesota legalized medical marijuana in 2014 and dispensaries opened their doors the following year. More than 18,000 patients are registered with the program, but they cannot be entirely certain the cannabis they have received was safe.

Another specific shortcoming highlighted by the audit was a failure to verify that the license of patients’ health care practitioners was active and in good standing.

It also did not keep valid documentation of the eligibility of parents or legal guardians accessing the program, and it did not adequately reconcile some fees or have adequate controls to help prevent and detect diversion or loss of medical cannabis by a manufacturer.

The report also noted the Health Department failed to comply with some legal requirements, but overall it said officials generally complied with most program rules.

Yet it was criticized for expanding the program to Minnesotans who might not qualify for it. In a hearing on the internal controls and compliance audit, Sen. Michelle Benson expressed her frustration with staff members for failing to create a proper inventory of spending.

Minnesota Department of Health Commissioner Jan Malcolm promised her team would improve in the future. “We are tightening those areas up with different software,” she said. “That will now allow the Office of Medical Cannabis to monitor for activities suspect of diversion, or inversion, or lack of inventory control.”

She added that teething problems were to be expected, considering the program was only created five years ago.

The program will expand this year, as chronic pain and age-related macular degeneration have been added to the list of qualifying conditions and the changes will go into effect in August. Minnesota could also launch efforts to legalize recreational cannabis use this year.