LOS ANGELES (AP) — A court has granted Carol Burnett temporary custody of her teenage grandson as the boy’s mother struggles with substance abuse.

A Los Angeles Superior Court on Tuesday judge granted the 87-year-old Burnett and her husband, Brian Miller, custody of her 14-year-old grandson Dylan West until Jan. 8.

The move came two weeks after Burnett and Miller had filed for custody, saying that her daughter, Erin Hamilton, had been struggling with addiction issues.

Burnett said in a statement that the move was for the boy’s “health, education and welfare and not intended to deny him nor the parents proper visitation with one another.”

The judge’s ruling says Burnett and Miller may change Dylan’s home and school at least until a hearing in January.

Hamilton, a singer, is the youngest of the TV comedy legend’s three daughters. Burnett has been married to Miller, a musician, since 2001.

An email seeking comment sent to a representative for Erin Hamilton was not immediately returned.