MANKATO, Minn. (AP) — The state Court of Appeals has thrown out the conviction of a southern Minnesota man, saying the amount of meth-tainted water found in his bong was far under the threshold required for his imprisonment.

Ryan M. Drown, 32, of Waseca was sentenced to 6 1/2 years in prison in 2013 for having the tainted water in a bong that amounted to less than half an ounce. He had been convicted for second- and third-degree drug possession in Blue Earth County District Court.

READ MORE: Vaccine Clinic To Be Held Outside U.S. Bank Stadium Ahead Of Rolling Stones Concert

But a 2011 amendment to a law required at least four ounces of water for such a serious conviction. Based on the amount of meth found in the bong, fifth-degree drug possession would have been the highest possible charge, and it wouldn’t have carried a prison sentence.

Drown was in prison for seven months and was granted release in July 2014 pending an appeal. The court ruling in his favor came last week.

Prosecutor Chris Rovney said trial lawyers and the judge made a mistake and they “all just dropped the ball on that.”

“I’m certainly not proud of it,” Rovney said. “We feel bad about it. We certainly don’t charge people to mess them up.”

READ MORE: Fourth Stimulus Check: Will You See Another Relief Payment?

He told The Free Press that attorneys looked at what they thought was a current version of the law, but that it must’ve been outdated.

State Rep. Phyllis Kahn, DFL-Minneapolis, was the chief sponsor of the bong water legislation. She said it’s surprising the change in the law wasn’t caught in Drown’s trial, given the attention that was given to it at the time it was passed. Former Gov. Tim Pawlenty talked about bong water in an appearance on “The Daily Show” in 2010.

“It’s truly unfortunate that nobody caught this,” Kahn said in a news release. “Seven months of somebody’s life was taken from them because everyone missed this change in law.”

Drown said he had mixed feelings because he “wasn’t truly guilty in the first place.” There was no accountability, he said, and he’s “going to push this as far as I can.”

MORE NEWS: Ask Minneapolis Mayoral Candidates Your Burning Question

(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)