Who were the principalities of Moldavia and Wallachia later return to