Who was the king of Poland