Electronic voting machines are prone to failures. In a 2015 report, the Brennan Center for Justice detailed how these systems are “often unauditable, susceptible to malware, frequently difficult to repair, and more prone to failure.” Researchers haven’t found much cause for optimism in follow-up reports. States are using machines that are more than 10 years old, and only one state—Virginia—has replaced its paperless machines. The settlement of a lawsuit against Pennsylvania, however, may be a small but notable first step in the fight for fairer elections.

After the 2016 election, former presidential candidate Jill Stein sued Pennsylvania, calling for an end to the use of paperless voting machines susceptible to tampering, hacking and general errors. On Thursday, Stein announced a settlement with the state.

The settlement guarantees that Pennsylvania will replace its current system with paper ballots by 2020. In addition, by 2022 the state will enact automatic audits after every election to ensure the accuracy of vote counts before results are certified.

“This is a critical victory for everyone concerned with the integrity of our elections,” Stein said in a statement, adding:

We congratulate the state of Pennsylvania for raising the bar not only for Pennsylvanians, but for voters everywhere. By agreeing to end the use of paperless voting machines, Pennsylvania is not only safeguarding its citizens’ right to vote. By example, the agreement is also a big step towards the retirement of paperless voting machines that one in four voters across the nation are still required to use, despite their demonstrated vulnerability to hacking, tampering, and error. Automatic robust audits provide an essential safeguard by cross-checking paper ballots against machine totals using hand counts and the human eye to make sure every election is verified before the results are official. These two reforms are a first step to restoring confidence in our broken elections.

Stein was also behind the campaign for a recount of the results in the 2016 election in other key contested states, including Wisconsin and Michigan.

Wisconsin’s recount ended only minimally different from the original count, with Trump adding 131 votes out of 3 million ballots, according to The Associated Press.

Stein’s request for the Michigan recount was denied, although she raised the money for one.

Read the entire Pennsylvania settlement here.