A 23-year-old Detroit man is finally reunited with his family after spending nearly nine years behind bars for a string of murders he didn’t commit. But the joyous reunion almost didn’t happen, as the young man had racked up over $2,000 in unpaid court fees while he was incarcerated.

Devontae Sanford was just 14 when he was wrongfully convicted of murdering four people at a Runyon Street drug house in 2009. According to the Detroit News, the young teen was sentenced to 37-90 years in prison for the killings. Despite a self-professed hit man coming forward to take responsibility for the murders a week later, Sanford remained locked up for the next nine years.

But a glimmer of hope came last Tuesday when Wayne County Circuit Judge Brian Sullivan overturned Sanford’s conviction and ordered his release from jail. The now young adult walked free from an Ionia, Michigan prison on June 8, just one day after judge Sullivan opted to vacate his conviction, the Detroit News reported.

According to NPR, Sanford’s mom, Taminko Sanford-Tilmon, got word last week that her son was coming home.

“The family’s getting excited. Everybody is coming over here,” Sanford-Tilmon told NPR of that day. And then, she said: “We hit a bombshell.”

The “bombshell” was the hefty court fines and fees her son amassed while behind bars. Sanford was billed $1,500 for a public defender, plus an additional $1,000 in general court fees, the news site reported. At the time, he was just a teenager with no income.

“I’m saying to myself, I don’t have this money,” Sanford-Tilmon explained. “I can barely afford my bills. How am I going to pay this money to get him out? I want him home. So it was like my back was against the wall.”

Charging the accused for a public defender is a common practice, according to a survey by the Brennan Center for Justice. The center’s study found that in 43 states and the District of Columbia, judges are allowed to charge someone for a public defender, NPR reported. Smaller fees can range from $10 to $400.

Lapeer County prosecutor John Miller said Sanford’s court fees piled up during his time at a juvenile detention center, not his time in prison for the wrongful murder conviction. The prosecutor recalls that in 2009, corrections officers stormed Sanford’s cell after he threatened to hang himself with clothing he had fashioned into a noose. The then teenager allegedly kicked one of the guards in the wrist and spit on another.

According to NPR, Sanford was assigned a public defender and charged with misdemeanor assault. The judge gave him another two years behind bars, but said the sentence could be expunged if he paid $2,500 in court fees, the news site reports. So even after Sanford’s conviction was vacated in Wayne County, his additional two-year sentence still stood in Lapeer County.

Miller said his office, along with Lapeer County chief judge Nick Holowka, worked to solve the issue. However, Holowka said he would only be able to drop Sanford’s charges and change his sentence after the Detroit man’s lawyers scheduled a hearing, NPR reports.

The mix-up would further delay Sanford’s release from prison; that is, until an anonymous donor came forward and offered to pay his expensive court costs.

“There was a very generous anonymous donor who knew about the case,” said Valerie Newman, an attorney who helped get Sanford’s conviction thrown out. “Whose response was, ‘I’m not going to let that happen. He’s not going to spend one more second locked up than he already has. I’m going to pay it.’ ”

According to NPR, the signed check was hand delivered to the court and Sanford was free to go home.

Now that he’s out of prison, Sanford plans to get his driver’s license and earn his GED.

“I want to try to put this behind me and move on with my life,” he said. “And move forward with my family, you know. Take one day at a time, one step at a time and just go from there.”

Sanford’s lawyers are now looking to file a civil rights lawsuit against the city of Detroit and Wayne County officials who wrongfully imprisoned him, Detroit News reported.