A federal appeals court has upheld the conviction of a man who went on a failed search for buried treasure at Yellowstone National Park and had to be rescued by helicopter.

Judges Gregory Phillips, Carolyn McHugh and Nancy Moritz, of the U.S. Court of Appeals for the Tenth Circuit, agreed with a magistrate judge’s ruling that the hiker, Mark Lantis, was guilty of reckless disorderly conduct, writing in a nine-page opinion published Tuesday that the magistrate judge correctly ruled Lantis “behaved recklessly by consciously disregarding a risk that he was aware of.”