Kevin Spacey lost a two-year legal battle to House of Cards producer MRC and is ordered to pay $31 million for breach of contract. Spacey, who played Frank Underwood on the hit Netflix show, has been repeatedly accused of sexually preying on young men.

According to Hollywood Reporter, MRC argued that Spacey’s conduct and unprofessional behavior caused the show and its production to suffer, as the sixth season was rewritten to exclude Spacey.

“The safety of our employees, sets and work environments is of paramount importance to MRC and why we set out to push for accountability,” read a statement put out by MRC.