 In May 1849 he was appointed Judge Advocate General, again re-elected in a by-election on 5 June, and made a member of the Privy Council on 29 June.In 1851 he was elected a Fellow of the Royal Society of Edinburgh his proposer being John Cockburn, the wine merchant who founded Cockburns of Leith.In 1852 he commissioned the architect William Burn to completely remodel the mansion at Dunira and lived there until the late 1860s.