Flash actor Ezra Miller is reportedly set to appear in court Friday to accept a plea deal to avoid jail time in connection with a break-in at a southern Vermont home last spring. The Associated Press was first to report.

A representative for the actor said they began treatment for “complex mental health issues” in August last year, following increasing legal troubles and erratic behavior, including multiple incidents of disorderly conduct and harassment. Miller has reportedly agreed to a suspended sentence of 89 to 90 days for the misdemeanor of unlawful trespass, be fined $500 plus a $192 surcharge, and be placed on probation for a year. Two other charges were dropped, including a felony burglary charge that could have carried a sentence of 25 years in prison.

“Having recently gone through a time of intense crisis, I now understand that I am suffering complex mental health issues and have begun ongoing treatment,” Miller said. “I want to apologize to everyone that I have alarmed and upset with my past behavior. I am committed to doing the necessary work to get back to a healthy, safe, and productive stage in my life.”

Miller was arrested twice last year in Hawaii, and again in Vermont.

The actor stars in the upcoming film The Flash, which is slated to hit theaters in June. In August last year, it was reported that Warner Bros. Discovery had paused Miller’s future in the DCEU, and developed a number of strategies for how to handle Miller’s involvement in promoting The Flash. It’s not yet known whether this movement on the charges against Miller affect further possible appearances in the DCEU.