Fixes to data sync, especially in regards to delete / undelete.