A Georgia family diverted millions of dollars intended to help feed the poor and used it to pay for their gambling trips, houses, cars and jewelry. The family that operated Angel Food Ministries even tapped some of the charity’s money for a down payment on a private jet. Now, one of those convicted in the scheme could get a new trial after a federal appeals court ruling this week.

The 11th Circuit Court of Appeals on Tuesday said the federal district court judge erred by not raising the issue of whether defendant Andrew Wingo was mentally incompetent when he took a plea deal. Even if Wingo's attorney didn't raise that issue, the court was obliged to, the ruling states.

In various court filings, doctors had said Wingo, who was Angel Food chief operating officer, had extensive brain damage, the ruling notes. His wife testified that he suffered from early-onset dementia. Friends said he had grown increasingly emotionally and mentally volatile. There was also testimony that he had a stress disorder relating to sexual abuse as a child and that he lived in a house with guns, knives and ammunition strewn about.

That information should have signaled the judge that Wingo may not have been competent to agree to a plea deal, the appeals court ruling says. The trial court will now have to hold an inquiry into whether Wingo was competent when he pleaded guilty in 2013. If he was not, his guilty plea must be thrown out, and the government won’t be able to retry him until he is competent.

The ministry closed in September 2011, citing the bad economy and high food and fuel costs. But in December 2011, federal officials announced an indictment against the ministry's leadership, following an FBI and IRS investigation that spanned years and involved hundreds of millions of documents.

At its peak, the Monroe-based ministry had grown into a $140 million-a-year operation, working with churches nationwide to gather donations and distribute food. But Wingo's father, pastor Joe Wingo, admitted to investigators that he used the charity for personal gain and allowed family members to do the same, The Atlanta Journal-Constitution reported. The father and son each drew seven-year prison sentences. Joe Wingo's wife, Linda, was sentenced to five years of probation. An Angel Food associate, Harry Michaels, drew a 30-month sentence.