AT&T just fired the guy who hired Michael Cohen as a consultant to advise the company on its huge merger with Time Warner.

The company hired President Trump’s personal attorney in early 2017 to give advice on how to approach its mammoth deal with Time Warner, which the Trump administration sued to block. “There is no other way to say it — AT&T hiring Michael Cohen as a political consultant was a big mistake,” AT&T CEO Randall Stephenson wrote in a companywide email obtained by the Washington Post and the New York Times.

Now, the company’s top Washington lobbyist who hired Cohen, Bob Quinn, is out.

“Our company has been in the headlines for all the wrong reasons these last few days, and our reputation has been damaged,” Stephenson added.

It’s not clear what kind of information Cohen was providing to AT&T, but he was collecting $50,000 a month for his insights, according to the Washington Post. And his influence has lawmakers concerned that hiring someone so close to Trump indicates that the company was trying to influence the government’s merger review process.

But Stephenson insists that, while this all looks bad, the company didn’t do anything illegal: “Everything we did was done according to the law and entirely legitimate,” he wrote in the email sent to employees.

And under current lobbying rules, he may be right.

Trump’s other attorney, former New York City Mayor Rudy Giuliani, told Bloomberg that Trump was unaware AT&T had contracted Cohen, who hasn't made any public comments about the matter.

Pharmaceutical company Novartis also contracted Cohen for advice on how to deal with the Trump administration on healthcare issues. Both Novartis and AT&T said they submitted information on their dealings with Cohen to special counsel Robert Mueller’s investigation into the Trump campaign’s ties to Russia.