It would hardly be an understatement to say that Ryan Routh is in legal trouble.

Routh faces federal firearms charges after being caught infiltrating a course where former President Donald Trump was playing golf. Florida will likely charge him with more serious offenses, including attempted murder.

We can now add one more potential charge: illegal voting.

Routh has long been registered to vote in North Carolina. He voted in several elections here in 2008 and 2009. He then re-registered and voted in 2012 after his voting rights were restored following a 2010 felony conviction. That is the last North Carolina election officials heard from him other than him changing his address on his registration in 2016.

Routh then moved to Hawaii in 2018. He ran a business there and lived in several residencies with a woman his neighbors described as his wife. According to officials in Honolulu County, Hawaii, Routh is also registered to vote there.

Being registered to vote in two or more states is not illegal. Such “double-dipping” registrations are surprisingly common and usually result from people registering to vote in their new state without notifying officials in their former state.

Only the most recent registration is legally valid, however.

Under North Carolina law, when someone moves to another state “with the intention of making that state … a permanent residence …, that person shall be considered to have lost residence” for voting purposes. If election officials know that a registered voter has moved out of state, that registration is canceled, and the person would have to establish residency again before registering and voting. Other states have similar laws.

When Routh moved to Hawaii, and certainly when he registered to vote there, he invalidated his North Carolina voter registration. When he voted in the North Carolina Democratic primary on March 5 with that invalid registration, he committed election fraud.

If Routh’s North Carolina registration was no longer valid, why was he allowed to vote?

I asked the director of the board of elections for Guilford County, North Carolina, if they had any indication that Routh had taken up residence in Hawaii. His reply was: “No, we received nothing from Hawaii, [the US Post Office] National Change of Address, nor any new resident at that [Guilford County] address.”

In short, North Carolina election officials had no idea Routh was not legally registered to vote there.

Election officials have long recognized the difficulty of maintaining clean voter rolls and preventing election fraud in the face of a highly mobile population. The best way to do that is for states to share data. For example, if North Carolina officials knew that Routh had moved to Hawaii, they would have canceled his registration in 2018.

There have been attempts to create such an interstate data-sharing system. The Interstate Crosscheck program, created in 2005 by the Kansas secretary of state, had 28 participating states at its height. But it fell into disuse in 2017 over data security concerns and was suspended two years later as part of a lawsuit settlement over a data breach.

An alternative program, the Electronic Registration Information Center (ERIC), was started in 2012 and currently includes 24 states and the District of Columbia. It boasts of a more secure database but has had problems of its own, including concerns over opaqueness over who has access to voter data, a lack of privacy protections for those on “eligible to vote but unregistered” lists, and the program’s potential partisan leanings. Those concerns led nine states to leave the program.

That highlights another problem with both data-sharing programs: not enough states participate. Those programs are effective only to the extent that states participate. Fewer states participating means more significant data gaps and more inaccurate voter rolls. California, arguably most in need of joining an interstate data-sharing program due to its poor list-maintenance practices and large outflow of residents, has never joined such a program.

We need a voter-data program that every state can comfortably join. It can either be a reformed ERIC or a new organization.

The same disrespect for our system that led Ryan Routh to try to kill a presidential candidate also led him to vote in North Carolina illegally. His illegal vote would not have been possible if North Carolina officials knew he had moved to Hawaii. It’s part of a data gap that can and should be closed.

However we do it, we owe it to voters to maintain cleaner voting rolls through an interstate data-sharing program.