CBS’ Bull is having some legal issues of his own.

According to a report by the New York Times, actress Eliza Dushku, who joined the cast of the CBS legal drama late in Season 1 as defense attorney J.P. Nunnelly, lodged a formal complaint with the network after being on the receiving end of several lewd comments made by series star Michael Weatherly. Dushku was poised to become a series regular, but soon after voicing her concerns, she was written off the show, and later given a $9.5 million settlement by the network as compensation.

CBS confirmed the settlement, which stemmed from a series of on-set incidents alleged by Dushku. She claims that Weatherly made demeaning comments about her appearance, saying “Here comes legs” when she arrived on set, said he would bend her over his leg and spank her in front of the cast and crew, and suggested she wanted to have a threesome with him and a male crew member. Dushku felt “disgusted and violated” following the incidents, according to interview notes from an internal CBS investigation.

Dushku confronted Weatherly about his behavior, and days later, was informed her character was being written out. Dushku entered into mediation with the network, which ultimately led to the $9.5 million settlement — the equivalent of what Dushku would’ve earned had she remained a full-time cast member for four more seasons.

Weatherly apologized in a statement to the Times: “During the course of taping our show, I made some jokes mocking some lines in the script. When Eliza told me that she wasn’t comfortable with my language and attempt at humor, I was mortified to have offended her and immediately apologized. After reflecting on this further, I better understand that what I said was both not funny and not appropriate, and I am sorry and regret the pain this caused Eliza.”

But he denies having anything to do with Dushku being written off the show: “It’s my recollection that I didn’t tell anyone how they should do their job regarding the hiring or firing of anybody.”