James Stewart, 1791-1863