Louis inherited Poland after his uncle's death in 1370. Since he had no sons, he wanted his subjects to acknowledge the right of his daughters to succeed him in both Hungary and Poland. For this purpose, he issued the Privilege of Koszyce in 1374 spelling out the liberties of Polish noblemen. However, his rule remained unpopular in Poland. In Hungary, he authorized the royal free cities to delegate jurors to the high court hearing their cases and set up a new high court. Suffering from a skin disease, Louis became even more religious during the last years of his life. At the beginning of the Western Schism, he acknowledged Urban VI as the legitimate pope. After Urban deposed Joanna and put Louis's relative Charles of Durazzo on the throne of Naples, Louis helped Charles occupy the kingdom. In Hungarian historiography, Louis was regarded for centuries as the most powerful Hungarian monarch who ruled over an empire "whose shores were washed by three seas".