The first sign of weakness in the Hats' government came after the war with Russia, which ended in Swedish defeat. In the Riksdag, an inquiry into the conduct of the war was proposed. The Hats managed to avoid this prospect by obtaining precedence for the succession question. King Frederick I had no legitimate children, and it fell to the Riksdag to elect his successor. Negotiations were opened with the Russian empress, Elizabeth of Russia, who agreed to restore the greater part of Finland to Sweden if her heir's uncle, Adolph Frederick of Holstein, were elected successor to the Swedish crown. The Hats eagerly caught at the opportunity of recovering the grand duchy and their own prestige along with it. By the Treaty of Åbo, on 7 May 1743, the terms of the empress were accepted and only a small part which lay beyond the Kymi river, often called Old Finland, was retained by Russia.