fix vitally important sync bug - the wrong items were being deleting in the sync merge