Who was the last ruler of the Swedish Empire?