In Hungary, Joseph had inherited the kuruc rebellion from his father Leopold I: once again, nobles in Transylvania (Siebenbürgen) had risen against Habsburg rule, even advancing for a time as far as Vienna. Although Joseph was compelled to take military action, he refrained – unlike his predecessors – from seeking to teach his subjects a lesson by executing the leaders. Instead, he agreed to a compromise peace, which in the long term facilitated the integration of Hungary into the Habsburg domains. It was his good fortune to govern the Austrian dominions and to be head of the Empire, during the years in which his trusted general, Prince Eugene of Savoy, either acting alone in Italy or with the Duke of Marlborough in Germany and Flanders, was beating the armies of Louis XIV of France. During the whole of his reign, Hungary was disturbed by the conflict with Francis Rákóczi II, who eventually took refuge in the Ottoman Empire. The emperor reversed many of the authoritarian measures of his father, thus helping to placate opponents. He began the attempts to settle the question of the Austrian inheritance by a pragmatic sanction, which was continued by his brother Charles VI.