With no sons and an uncertain future, in 1374 Louis signed a treaty with the Polish nobles called the Privilege of Koszyce. The nobility was released from many of its duties, including building and repairing castles, paying tribute, tending to towns and bridges, and even providing hospitality for the king on his travels, on just one condition: that they make one of his three daughters ruler of Poland after his death.