Google is slated to pay just $13 million to settle a lawsuit in the so-called Wi-Spy scandal that could have cost the tech giant billions in fines.

Plaintiffs alleged the company wiretapped consumers and mined personal information—email addresses, passwords, and more—from tens of millions of home WiFi networks as it compiled data for Google Maps. Cars connected to unencrypted home WiFi networks were taking photos for Google Street View, a feature that launched in 2007 and allows users to see three-dimensional renderings of streets.

Pending a judge’s final approval, the settlement dictates that Google, which admits no wrongdoing, will relinquish the offending data and commit to training users how to better safeguard their privacy.

The Supreme Court declined to hear Google’s appeal of the case in 2014, affirming a lower court’s decision that wiretapping law applied to home WiFi networks. If the suit went to trial and Google lost, the company could have been fined thousands of dollars for every one of the tens of millions of households whose data it collected. The company settled a similar case with 38 states for $7 million in 2013, which also required it to destroy the data taken from the WiFi networks. The proposed payout of $13 million will go to several privacy advocacy groups.

Google and its subsidiary YouTube recently settled two other high-profile lawsuits. The internet search company, again admitting no wrongdoing, agreed to pay $11 million late last week to close a class-action suit alleging that it favored younger applicants at the expense of qualified older ones. More than 200 people joined the suit.

In addition, The Washington Post and Bloomberg report that YouTube and the FTC have reached a settlement over YouTube’s alleged violations of children’s privacy. The FTC had been probing whether YouTube broke the Children’s Online Privacy Act (COPPA), which forbids collecting data on children under 13, after activist groups lodged a complaint last year.

Alphabet, the parent company of Google, declined to comment on the lawsuits and settlements. In the motion approving the age discrimination settlement, the company denied that it showed bias against applicants based on age.