Chipotle’s chief marketing officer pleaded guilty to misdemeanor cocaine possession six months after he and several others involved in a cocaine ring were arrested in a drug bust.

Prosecutors said that Mark Crumpacker, 53, could have his case dismissed if he attends treatment for a year and stays out of trouble, the Daily Mail reports.

Chipotle placed Crumpacker on leave after he was indicted in a New York cocaine ring where he was identified as a customer.

Crumpacker was arrested in July on several counts of misdemeanor cocaine possession, and bail was set at $10,000 or $4,500 cash back.

In September, he returned to work as chief creative and development officer to try to help Chipotle recover from a series of PR disasters.

Prosecutors said officials caught Crumpacker on wiretap 13 times ordering cocaine to be delivered to his apartment near Union Square, the New York Daily News reported.

Manhattan Supreme Court Justice Ellen Biben asked Crumpacker if he “knowingly and unlawfully” had cocaine on January 29, as charged in the second count of his indictment.

He replied that he had as Biben told him that to benefit from getting his case dismissed, he had to attend treatment, pass regular drug tests, and avoid getting rearrested.

“We’re very happy the case will ultimately be dismissed,” Crumpacker’s lawyer Gerald Lefcourt said outside the courtroom.

A Fox Business Network producer and a Cushman & Wakefield employee were also among those indicted. Accused drug peddlers were charged, as well.