ST. PAUL, Minn. (AP) - A federal court has affirmed the conviction of a former Minnesota head shop owner who openly sold millions of dollars' worth of synthetic drugs from a store in Duluth called The Last Place on Earth.

The 8th U.S. Circuit Court of Appeals ruled Thursday that the law that that sent James Carlson to prison is constitutional, the evidence was sufficient to convict and that key decisions by the judge during Carlson's 2013 trial were correct.

Carlson was sentenced to 17 1/2 years in prison and ordered to forfeit $6.5 million. His case was one of the first major tests in federal court of how effectively authorities can combat synthetic drugs, which are difficult to regulate because the formulas keep changing.