The Florida House on Wednesday passed an election reform bill intended to prevent some of the problems that plagued the 2018 midterms and turned a statewide recount into a dramatic affair dogged by faulty equipment and sloppy mistakes.

The bill, crafted with the input of Florida’s election administrators, eliminates a ballot design believed to have caused thousands of voters in Broward County to skip the U.S. Senate race between Rick Scott and Bill Nelson. And it ends the use of outdated vote-tabulation equipment that left Palm Beach County’s election office unable to complete its recount on time.

The bill seeks to explicitly lay out a “chain of custody” for ballots and standardize the handwriting training used to accept or toss mail ballots based on voter signatures, and it improves the process by which voters are informed when their ballots are rejected.

Lawmakers have no control over the voter-fraud conspiracy theories espoused by President Donald Trump that helped turn a recount of three statewide races into a circus. But they hope the proposed changes to Florida’s election laws will reduce the number of rejected ballots and prevent seemingly minor flaws from turning into major disasters.

“This election bill, which is backed by both Democrat and Republican supervisors of elections, expands voter access for millions of Floridians while protecting the integrity of the ballots,” said Spring Hill Rep. Blaise Ingoglia, chairman of the committee that sponsored the legislation in the House. “This is much needed reform so we do not have a repeat of the 2018 election in future elections.”

The Florida Senate passed a version of the bill last week by a 39-1 vote, but the legislation will head back to the upper chamber after the House approved an amendment by state Rep. Ben Diamond requiring election offices to place mail ballot drop boxes at all early voting centers and staff them with an elections worker or police officer.