Charlie Sheen was denied full custody of his twin sons on Tuesday.

The reason the judge did not award Sheen full custody was because of the actor's troubled past.

TMZ, who was the first to break the story, is reporting that Sheen was denied custody despite Judge Hank Goldberg being well aware that Sheen's ex-wife Brook Mueller had relapsed into drug use. According to the report, the judge was equally disturbed by Sheen's substance abuse and how he shows off and glorifies it.

Sheen was looking to gain full legal and physical custody of his twin boys, Bob and Max. Despite Sheen's plea, Judge Goldberg ruled that the agreement between Sheen and Mueller will remain in effect.

Mueller's lawyers raised issues regarding Sheen's history with domestic violence, which also factored into why Sheen was denied custody.

According to TMZ, Judge Goldberg believed Mueller and Sheen have problems, but the twins were adequately protected by the nannies, relatives and other support staff.