Wall Street’s industry funded watchdog fined the brokerage unit of Morgan Stanley $10 million on Wednesday for compliance failures in the firm’s anti-money laundering program, the regulator said.

The Financial Industry Regulatory Authority (Finra) said the lapses spanned more than five years, from January 2011 until April 2016.

Morgan Stanley, which agreed to the fine as part of a settlement, did not admit or deny Finra’s charges, but consented to the entry of the regulator’s findings.

“We are pleased to have resolved this matter from several years ago,” Morgan Stanley said in a statement.

Finra rules require brokerages to have policies and procedures in place to comply with a federal law aimed at detecting and curbing money laundering.

A Morgan Stanley automated surveillance system did not receive important data from other Morgan Stanley systems, Finra said. The lapse impaired the firm’s overall tracking of tens of billions of dollars of wire and foreign currency transfers, Finra said.

Those transactions included transfers to and from countries known for money laundering risk, Finra said.

In 2015, a consultant that Morgan Stanley hired to test its surveillance identified several “high risk” issues, according to the settlement agreement. Morgan Stanley did not fix one of those problems until at least February 2017.

Morgan Stanley’s other violations include failing to “reasonably monitor” customers’ deposits of 2.7 billion shares of penny stock between 2011 and 2013, Finra said.

Low-priced securities, such as penny stocks, are often subject to efforts by fraudsters to falsely inflate trading volume and share prices, a securities law violation that is frequently a precursor to money laundering, according to anti-money laundering compliance professionals.

Morgan Stanley has taken “extraordinary steps” since 2013 to improve its anti-money laundering programs, including a new automated process for monitoring of penny stock transactions and potential insider trading, Finra said in the settlement.