Fixed sync bug in DS and client