fixed sync bug