Wells Fargo & Co. customers who didn’t consent to having 3.5 million accounts created by bankers trying to hit sales quotas are finally getting what a judge called “rough justice.”

U.S. District Judge Vince Chhabria agreed Wednesday to issue final approval for a $142 million class-action accord that will pay an average of $35 for account holders at the center of the company’s worst scandal in modern history.

At a hearing, the San Francisco judge told attorneys who objected to the settlement that it has flaws, but said it’s better than pressing forward with trial or proceeding with lots of individual lawsuits.

“There’s no doubt this is an imperfect solution, but what’s the alternative?” Chhabria said. “I do believe this settlement is fair and there was a conscientious effort by both parties to come up with the least-worst solution for what’s happened here.”

The settlement is the latest fallout for Wells Fargo for creating unauthorized savings accounts, credit cards and lines of credit from May 1, 2002, to April 20, 2017. The bank said it fired more than 5,000 employees linked to the malfeasance, agreed to refund customers and paid fines totaling $185 million.

Payouts for individual customers will vary according to how many fake accounts were created in their names and the damage to their bank balances and credit scores.

Chhabria asked consumer attorneys who negotiated the deal to file additional paperwork that will delay approval until at least June 4. The filings will include an oversight mechanism to ensure the settlement is fully enforced before plaintiffs’ attorneys receive their $21 million portion. There may be also be a bond requirement for appeals to deter “serial objectors” from trying to block the settlement.

Consumers from Utah and Texas will appeal the approved settlement to the U.S. Court of Appeals in San Francisco, said Steven Christensen, the attorney who filed the first consumer suit against the bank after the Consumer Finance Protection Bureau fined Wells Fargo in September 2016. The appeal will probably delay payouts to consumers.

“No one knows the true number of victims,” Christensen wrote in a court filing on May 14. He called for further investigation into the bank’s behavior, including details into its alleged “shredding parties” where documents detailing the fake accounts were destroyed.

He also faulted the bank’s record-keeping.

“On occasion, they allege the records are meticulously maintained, and constitute sufficient evidence to force a helpless customer/victim into arbitration,” he said. “In the next breath, the CEO of the company publicly announced that many of the bank’s records were not reliable due to age and storage reasons.”

Supporters of the settlement say it’s probably impossible to identify every affected consumer. But the accord allows for the $142 million payout to be increased if enough customers file claims.

Wells Fargo declined comment.