PHOENIX - NOVEMBER 4: People line up to vote at the Albright United Methodist Church November 4, 2008 in Phoenix, Arizona. Voting is underway in the U.S. presidential elections with Democratic presidential nominee Sen. Barack Obama (D-IL) leading in the polls against the Republican presidential nominee Sen. John McCain (R-AZ). (Photo by Mark Wilson/Getty Images)

While Americans waited for election results on Tuesday, some voters in Arizona waited five hours or more just to cast a ballot -- long after the polls closed. "Eventually, I gave up at 6:40 p.m. when I saw the line at its longest, at least 2-3 hours," one Maricopa County voter told the Arizona Republic. "This was the first time in my life I genuinely felt disenfranchised."

The lines stemmed from changes to voting procedures. The county closed 70 percent of locations to cut costs but in turn allowed voters to go to any site to cast a ballot. (Adding this kind of convenience is ostensibly a good thing.)

Many have pointed out that the Voting Rights Act may have stopped this from happening if the Supreme Court hadn't gutted it in 2013. That law would have required state officials to prove to the Department of Justice (or a federal court) that minority voters would not be worse off if the home poll sites were shut down.

That's true, and the VRA is a critical tool that must be restored. But, there is another problem looming large in our democracy -- the serious underfunding of America's election infrastructure.

We already had one election hanging in the balance because of voting system problems. Left unaddressed, we could see more long lines and lost votes -- and possibly another Florida 2000 nightmare.

America has 50 states and thousands of counties and election jurisdictions. That means each state or county must budget for Election Day, and dole out funds for poll workers, machines, printouts for voter rolls, and other materials.

With resources stretched thin, states prioritize other areas like education over election costs. While of course tough decisions do need to be made, voters can bear the brunt, as we saw in Arizona on Tuesday.

Even worse, minorities are more likely to be affected. According to a Brennan Center study of three states with long voting lines in 2012, precincts with more minority voters tended to have fewer election resources and longer lines. In the 10 precincts with the longest wait times in South Carolina, for example, 64 percent of registered voters were black, compared to 27 percent across the state. In Maryland, the 10 precincts with the lowest number of machines per voter had more than double the percentage of Latinos. (Florida was the other state studied, and the findings were similarly gloomy.)

America's voting equipment is also rapidly aging out. In 2016, 43 states will have electronic voting machines a decade old or more. These machines are essentially computers. Imagine using your laptop from the early 2000s, with Windows 98 or XP, to vote. Old machines are more likely to break down on Election Day, which causes delays and other problems for election workers.

"I feel like I'm driving around in a 10-year-old Ford Taurus and it's fine and it's getting the job done, but one of these days it's not going to wake up," Florida election supervisor Lori Edwards told USA Today. That's the technological reality many jurisdictions face today.

There are many steps officials can take to address these problems before Election Day. Test voting machines for errors and if any patterns emerge in particular machines, notify election officials so they can prepare. Have sensible guidelines and follow them for how many workers and machines should be at each polling site.

But long term, our government needs a serious investment to revitalize our democratic infrastructure.

Each state should have nonpartisan election professionals overseeing all state elections and competent and well-trained poll workers interacting with voters. Election regulations should be enforced fairly and accurately in every precinct -- Democrat and Republican, urban and rural, black, white, and Latino.

Nationally, there should also be federal guidelines outlining how many poll sites, poll workers, and machines are appropriate for a district depending on the number of registered voters. Clearly 60 precincts for more than 1 million voters was the wrong call. We need better ways to spot that kind of error, correct it before Election Day, and make sure every American can cast a ballot that counts.

Erik Opsal is deputy communications director at the Brennan Center for Justice at NYU School of Law.