JPMorgan Chase acknowledged this week that it overcharged some 4,000 military families for their mortgages and wrongfully foreclosed on at least 14. It's not clear how much the mistakes have cost these families, but the bank told NBC News that it’s collectively refunding about $2 million to those affected. It has also promised to restore the homes that were lost.

According to NBC, the bank violated a law called the Servicemembers Civil Relief Act, which grants active-duty troops some protection from foreclosure and caps their mortgage interest rates at 6 percent.

The mistakes came to light after a Marine captain and his wife were overcharged, fought debt collection attempts for years, and finally filed suit. From NBC:

The Rowles' records show that while they kept making payments on their mortgage at 6 percent, the bank wrongly had been charging them at rates above 9 or 10 percent. They kept calling the bank to explain there had been a huge mistake but say no one would listen. They say they kept being harassed for money they did not owe.

A Chase spokeswoman said the bank is “deeply appreciative of those who fight to protect our country” and feels “particularly badly about the mistakes we made here.” (Read the bank’s full statement.)

The Rowles family is hardly the first military family to have to fight against the banks and their handling of mortgages. Other lenders and servicers, including Aurora Loan Services and OneWest Bank, have also made headlines in the past by foreclosing on military families or revoking offers of loan modifications.

Bloomberg noted in 2008 that in military towns, foreclosures were increasing at a rate almost four times the national average, despite the special protections given to military families.