R&B singer Chris Brown will be returning to rehab after a judge ordered him on Wednesday to complete a three-month stay in a treatment facility.

The Daily Mail reports Los Angeles Superior Court Judge James R. Brandlin has ordered that along with his three months in a residential rehab facility, Brown must also partake in drug testing and perform at least 24 hours of community labor each week. The judge’s orders come after it was uncovered that Brown was kicked out of a rehab program following an incident in which he threw a rock through his mother’s car window. Brown voluntarily entered that rehab facility after he was arrested in October on a misdemeanor assault charge in Washington, D.C.

Brown’s mother came to the facility to attend a “joint counseling session” and encouraged Brown to remain in the program for more treatment, reports the AP. Following the session, tossed the rock the car window, a letter written by the rehab facility detailed. Since Brown signed a contract saying he wouldn’t act out in violence while at the facility -- which wasn't named in court documents -- he was discharged from the program.

Brown’s attorney, Mark Geragos, said the singer will follow the rules set by the judge and recommended by his probation officer. But Brown still faces a possible probation violation stemming from the October assault incident, when a 20-year-old man claimed the R&B star punched him in the face after he attempted to take a photo with the singer.

Brown is scheduled to appear in a D.C. court on Monday for a hearing on that incident. The singer remains on probation for his 2009 attack on Rihanna, his girlfriend at the time.