sync: several fixes