The House Judiciary Committee voted 13-7 in favor of a bill that would prohibit the attorney general from overseeing cases involving any company that donated money to his election campaign or from which the attorney previously benefited.

The bill came after it was revealed that Republican Attorney General Patrick Morrisey had ties to two pharmaceutical companies his office was suing. The case dealt with claims arising from prescription pill profits the companies made in West Virginia. Morrisey recused himself, and two other state agencies are now overseeing the case.

Morrisey inherited the cases from the previous attorney general.

A Morrisey spokeswoman called the bill “partisan politics” by House Democrats.