sentence1: This was resolved with the Ostrów Agreement -- Vytautas became the Grand Duke of Lithuania while Jogaila retained rights of an overlord .
sentence2: This was resolved by the Ostrów agreement -- Jogaila became Grand Duke of Lithuania , while Vytautas retained the rights of an overlord .