wait for the sync to occur