Original sentence: After his death, the Peace of Bratislava in 1491 concluded the war and Sevnica Castle with the belonging estate then became the possession of the emperor, but the new Emperor Maximilian the First  returned it in 1494 to Salzburg Archdiocese.During the ensuing war, Bernard established alliance with the governor of Hungary Matthias Hunyady - Corvinus and resigned to his custody many nowadays Slovenian castles in Carinthia and Styria, with Sevnica Castle among them.Matthias Hunyady was very popular with simple folk, many stories about him were passed on by oral tradition and he became Slovenian legendary King Matthias owing to this
Edited sentence: After his death, the Peace of Bratislava in 1491 concluded the war and Sevnica Castle with its manor then became the possession of the emperor, but the new Emperor Maximilian the First  returned it in 1494 to Salzburg Archdiocese.During the ensuing war, Bernard established alliance with the governor of Hungary Matthias Hunyady - Corvinus and he resigned to his custody not only Sevnica Castle with the belonging manor but also many other nowadays Slovenian castles in Styria and Carinthia.Matthias Hunyady, whose army thereafter occupied considerable part of the Slovenian ethnic territory, was very popular with simple folk.So many stories about him were passed on by oral tradition and he became Slovenian legendary King Matthias owing to this