Who was the reigning King of the United Kingdom until 1817?