A former Apple lawyer is being indicted for the very thing he was meant to stop from happening at the company.

CNBC has the report. Gene Levoff was Apple’s senior director of corporate law for the company. According to the report, Levoff was aware of Apple’s financial results before they were made public. As a result of that knowledge, the government alleges, Levoff traded based on that knowledge. And for those keeping score, that’s called insider trading.

Which is comical because Levoff was in charge of enforcing Apple’s very own Insider Trading Policy, based on the indictment filed against Levoff. The report states that the former Apple lawyer is facing 12 counts in all: six counts of security fraud and six counts of wire fraud.

This scheme to defraud Company-1 and its shareholders allowed Levoff to realize profits of approximately $227,000 on certain trades and to avoid losses of approximately $377,000 on others,” according to the press release.

It continued: “When Levoff discovered that Company-1 had posted strong revenue and net profit for a given financial quarter, he purchased large quantities of stock, which he later sold for a profit once the market reacted to the news.

Levoff began work at Apple way back in 2008. Between the years 2013 and 2018 Levoff served as senior director of corporate law for the company. The indictment reveals that Levoff participated in the insider trading between the years 2011 and 2016.

The indictment also reveals that during an Apple “black out”, a point in time when Apple employees are not allowed to buy or sell stock, Levoff was still busy trading stock. And Levoff was the one informing those employees of the black out period(s).

Each count against Levoff carries a maximum 20 years in prison, along with additional fees. The Securities and Exchange Commission (SEC) originally filed a civil suit against Levoff back in February of this year. However, this new indictment is criminal.