A Texas man imprisoned 30 years ago on aggravated robbery charges had his conviction overturned on Tuesday after DNA evidence exonerated him.

Dallas County Judge Don Adams overturned Cornelius Dupree Jr.’s conviction Tuesday, clearing his name officially.

"It's a joy to be free," Dupree, 51, said outside court.

Dupree has served more years in a Texas prison for a crime he did not commit than anyone else in the state who was later exonerated by DNA evidence. Only two other people exonerated by DNA have spent more time in prison in the entire country, the Innocence Project said. Texas has freed 41 wrongly convicted prisoners because of DNA testing since 2001, more than any other state.

Dupree told CNN after becoming a free man that he had "mixed emotions" about the hearing considering how long he had been incarcerated.

"I must admit there is a bit of anger, but there is also joy, and the joy overrides the anger," he told CNN. "I'm just so overwhelmed with the joy of being free."

The judge's decision followed comments from Dallas County District Attorney Craig Watkins, who said the DNA testing shows Dupree "did not commit this crime."

Dupree is trying not to be too angry, despite having 30 years of his life taken away.

"I think that could have happened to anyone," he told CNN. "It's just unfortunate that it happened to me. The system needs to be corrected somehow."

That system he refers to includes Dallas specifically, where a record 21 people have been exonerated on DNA evidence, and Texas as a whole.

"Cornelius Dupree spent the prime of his life behind bars because of mistaken identification that probably would have been avoided if the best practices now used in Dallas had been employed,” Barry Scheck, co-director of the Innocence Project, said in a press release. "Let us never forget that, as in the heartbreaking case of Cornelius Dupree, a staggering 75% of wrongful convictions of people later cleared by DNA evidence resulted from misidentifications.”

Nina Morrison, senior staff attorney at the Innocence Project, told CNN "an enormous number" of the wrongly accused people convicted in Dallas and around the country were convicted on the basis of mistaken witness identification.

But she said that big improvements in those procedures have been made "so that what happened to Mr. Dupree doesn't happen to anyone else."

Morrison attributed Dupree's exoneration also to the work of the district attorney who has been examining previous convictions closely - and to Dallas County's saving of evidence.

"Dallas has been a leader in saving evidence," she said, noting that even though the policy was evidence had to be saved from cases from 1981 and later, evidence from Dupree's case in 1979 still existed.

"So it was something of a small miracle" that it was preserved, she said.

Watkins, the district attorney, said there were really no standards in place about how to keep evidence, but when he came into office he made it his job to do whatever he could to "not just to seek convictions but to seek justice."

"We created a unit that specifically looked at claims of innocence," he said. "And unfortunately it shows people who made those claims were truly innocent."

Watkins works with Morrison and others at the Innocence Project now, hoping to right wrongs from the past, and bring trust back to a system that has been brought into question.

"It gives us credibility now," he said. "[Residents] actually believe in what we're doing, that we're here not just to seek convictions but to seek justice and seek the truth."

Dupree was paroled six months ago after DNA tests results came back. He was declared innocent on Monday, the Innocence Project said.

Dupree was accused of being one of two men who forced a 26-year-old woman and another male into a car at gunpoint in 1979, forcing them to drive the car and robbing them in the process, according to court documents. The two men also were accused of raping the female, court documents said. But, prosecutors did not pursue rape charges in the case because it would not result in additional jail time, according to the Innocence Project.

The female victim initially identified Dupree from a photo line-up, but the male was unable to do so, according to court documents. At trial, however, both victims said Dupree and his co-defendant Anthony Massingill were the ones who committed the crime. They were convicted, and Dupree was sentenced to 75 years. Massingill, who is also serving time for a separate rape charge, is expected to also have his conviction set aside, the Innocence Project said.

Dupree has been fighting for his innocence since the day he was arrested, and for years following his conviction claiming he was mistakenly identified as the suspect. The Court of Criminal Appeals turned him down three times.

“Mistaken identification has always plagued the criminal justice system, but great strides have been made in the last three decades to understand the problem and come up with fixes like those being considered by the state Legislature that help minimize wrongful convictions,” Morrison said in a press release. “We hope state lawmakers take note of the terrible miscarriage of justice suffered by Cornelius. When the wrong person is convicted of a crime, the real perpetrator goes free, harming everyone.”