In Switzerland in 1799, he suppressed the Valais uprising and captured the Valais border posts with northern Italy. Placed on trial a second time, this for peculation, he again faced a courts-martial, in which he was acquitted. He retired from the army in 1804, but returned briefly in 1813. He was taken prisoner at the Battle of Leipzig, and died in 1833 in poverty.