Google tentatively agreed to undergo a significant change to the way it gathers user information from emails thanks to a proposed settlement to a privacy lawsuit filed against the search company in a northern California district court, according to a report from the Verge.

The change will require Google to hold off on collecting any advertising data before an email is made available in a user’s inbox. The current system scans every email as it comes in, and information from those messages is taken in by Google’s ad-targeting system.

Google’s terms of service allow for this, but only Gmail users have agreed to the system. Emails sent from non-Gmail accounts were subject to the same scan enough though the senders never consented to it.

That small but significant issue was the premise of a lawsuit filed against Google in September 2015. The case, Matera vs. Google, was brought by plaintiffs who don’t use Gmail and believed the scanning of emails violated the federal Electronic Communications Privacy Act and the California Information Privacy Act.

Google voluntarily agreed to settle the case by changing its scanning practice. While it will continue to check emails in advance for virus protection and spam filtering purposes, the company will postpone the advertising-related scan until after the email is accessible in a user’s inbox.

The change represents just a few milliseconds of activity in real time, something no user is likely to notice. But for Google, it represents a significant technical change to its scanning systems. The company will also be on the hook for up to $2.2 million in attorney fees and up to $2,000 for each of the class action representatives.

Google has come under fire for its email scanning practices in the past, including an ad campaign launched by Microsoft targeting the search giant for its snooping practices.

Yahoo! was subjected to a similar lawsuit earlier this year, in which the company agreed to pay $4 million for violating the privacy of users. Like Google, Yahoo! also agreed to delay its advertising scans to comply with privacy laws.