Hundreds of people had their homes foreclosed on after software used by Wells Fargo incorrectly denied them mortgage modifications.

The embattled bank revealed the issue in a regulatory filing this week and said it has set aside $8 million to compensate customers affected by the glitch.

The same filing also disclosed that Wells Fargo is facing “formal or informal inquiries or investigations” from unnamed government agencies over how the company purchased federal low-income housing tax credits. The document states the probes are linked to “the financing of low income housing developments,” but does not offer further details.

Reuters first reported news of investigations and mishandled mortgage modifications on Friday.

Wells Fargo said the computer error affected “certain accounts” that were undergoing the foreclosure process between April 2010 and October 2015, when the issue was corrected.

About 625 customers were incorrectly denied a loan modification or were not offered one even though they were qualified, according to the filing. In about 400 cases, the customers were ultimately foreclosed upon.

Wells Fargo said in a statement that it was “very sorry that this error occurred” and said it was “providing remediation” to the affected customers.

A spokesperson for the bank “there’s not a clear, direct cause and effect relationship between the modification” denials and foreclosures, but confirmed customers who were denied modifications lost their homes.

Related: Wells Fargo to pay $2 billion fine in mortgage settlement

Wells Fargo has been mired in a series of scandals in recent years that have cost the firm billions and left it facing a string of lawsuits and investigations.

Earlier this week, the Justice Department announced Wells Fargo agreed to pay a $2.1 billion fine for issuing mortgage loans it knew contained incorrect income information. The government said the loans contributed to the 2008 financial crisis that crippled the global economy.

In June, Wells Fargo was accused by the federal Securities and Exchange Commission of using complex financial investments to take advantage of mom-and-pop investors. Wells Fargo, which neither admitted nor denied the SEC’s allegations, said at the time it “cooperated fully” with the SEC probe.

One of its most far-reaching scandals involved the creation of millions of fake accounts the company created for unsuspecting customers in order to boost its sales figures. The scope of that issue ballooned since the practice was first uncovered in September of 2016.

The bank has also admitted to hitting customers with unfair mortgage fees and charging people for car insurance they didn’t need.