The remnants of these privileges were gradually abolished in the aftermath of the Great Northern War (1700-1721), in which hetman Ivan Mazepa sided with Sweden. By the time that the last of the partitions of Poland ended the existence of the Commonwealth in 1795, many Cossacks had already left Ukraine to colonise the Kuban and, in process, Russified themselves. Sources vary as to when the uprising ended. Russian and some Polish sources give the end-date of the uprising as 1654, pointing to the Treaty of Pereyaslav as ending the war; Ukrainian sources give the date as Khmelnytsky's death in 1657; and few Polish sources give the date as 1655 and the Battle of Jezierna or Jeziorna (November 1655). There is some overlap between the last phase of the uprising and the beginning of the Russo-Polish War (1654–1667), as Cossack and Russian forces became allied. Casualties Estimates of the death tolls of the Khmelnytsky uprising vary, as do many others from the eras analyzed by historical demography. As better sources and methodology are becoming available, such estimates are subject to continuing revision. Population losses of the entire Commonwealth population in the years 1648–1667 (a period which includes the Uprising, but also the Polish-Russian War and the Swedish invasion) are estimated at 4 million (roughly a decrease from 11 to 12 million to 7–8 million). Massacres Before the Khmelnytsky uprising, magnates had sold and leased certain privileges to arendators, many of whom were Jewish, who earned money from the collections they made for the magnates by receiving a percentage of an estate's revenue. By not supervising their estates directly, the magnates left it to the leaseholders and collectors to become objects of hatred to the oppressed and long-suffering peasants. Khmelnytsky told the people that the Poles had sold them as slaves "into the hands of the accursed Jews." With this as their battle cry, Cossacks and the peasantry massacred numerous Jewish and Polish–Lithuanian townsfolk, as well as szlachta during the years 1648–1649. The contemporary 17th-century Eyewitness Chronicle (Yeven Mezulah) by Nathan ben Moses Hannover states: Wherever they found the szlachta, royal officials or Jews, they [Cossacks] killed them all, sparing neither women nor children. They pillaged the estates of the Jews and nobles, burned churches and killed their priests, leaving nothing whole. It was a rare individual in those days who had not soaked his hands in blood ... Jews Most Jewish