Merrill Lynch was fined $8 million and will have to return $24 million to customers due to allegations of overcharging more than 47,000 retirement accounts and charities invested in mutual funds.

The Financial Industry Regulatory Authority (FINRA) said the fines and refunds to customers are in addition to the $64.8 million Merrill has already paid out; the total comes to about $97.2 million.

Merrill, like most investment firms, offers mutual fund shares in classes A, B and C. Class A shares usually have lower fees, but there are upfront fees to purchase them.

FINRA says Merrill did not offer fee waivers to its customers on retirement accounts beginning back in 2006 and continuing for more than five years. Instead of providing the waivers, Merrill asked financial advisers to do so, and they were not properly supervised.

Because of this, approximately 41,000 small business retirement plans and 6,800 charities and 403(b) retirement plans available to ministers and public school workers had sales charges or higher fees on Class A shares. They should not have paid these higher fees or sales charges, FINRA says.

About 16,200 of these accounts will share the settlement of $24.4 million, according to settlement papers.

"Investors must be able to trust that their brokerage firm will offer the lowest-cost share classes available to them," said FINRA enforcement chief Brad Bennett in a statement. 

By settling the case, Merrill is not denying or admitting to the charges. Merrill spokesman Bill Halldin said the company discovered the errors and immediately began issuing the refunds.

"Merrill Lynch failed to offer available waivers to customers, including small business retirement accounts and charitable organizations. FINRA's commitment to investor protection is highlighted by the significant restitution component of this settlement, which reinforces that investors must be able to trust that their brokerage firm will offer the lowest-cost share classes available to them. When firms fail to do so, we will take appropriate action," said Brad Bennett, FINRA's executive vice president and chief of enforcement.

Merrill Lynch is owned by Bank of America, which is based in Charlotte, North Carolina.