A judge agreed on Friday to allow Harvey Weinstein to hire a new defense team, despite concerns that two of the new attorneys represented Weinstein accuser Rose McGowan on a drug charge.

Weinstein was in court in Manhattan on Friday morning along with his former lawyer, Ben Brafman, and three of his new attorneys: Jose Baez, Ronald Sullivan, and Duncan Levin. Weinstein is accused of raping a woman in 2013 and performing a forcible sex act on another woman in 2006. He faces life in prison if convicted.

Brafman had represented him for more than a year, and won the dismissal of one of six charges in the case. However, relations between Weinstein and Brafman broke down following the failure of a motion to dismiss the entire case in December. In addition to the three attorneys who were in court, Weinstein has also hired Pamela Mackey, a Colorado attorney who defended Kobe Bryant against rape allegations in 2003.

Justice James Burke approved the switch in attorneys, according to local media reports, though he did take note of the potential conflict of interest.

McGowan has alleged that Weinstein sexually assaulted her in 1997. Her allegations are not part of Weinstein’s criminal case, though it is at least conceivable that she could be called to give supporting testimony at his trial.

Baez and Sullivan represented her in a drug possession case that recently ended with a no contest plea in Virginia. The attorneys previously said they consulted with ethics counsel on the matter, and were advised there is no conflict of interest.

In court, Burke advised Weinstein that his lawyers would not be able to use any information they gained through that representation to help his defense. Burke suggested they might not cross-examine her as aggressively as they would otherwise, and would not be able to share any information from the McGowan case with other attorneys on the team.

Weinstein and his attorneys said they would be comfortable with that.

Baez is best known for successfully defending Casey Anthony on charges that she murdered her daughter, and winning an acquittal for NFL star Aaron Hernandez in a double murder case.