 From 1817 to 1819 he was a tutor in Hungary.Returning to Vienna in 1819, he was arrested there after the murder of August von Kotzebue by Karl Ludwig Sand on the false suspicion of belonging to a Swiss political society and was expelled form the city in 1820.He began his political career as keeper of the archives of his native canton, St. Gall.