fix sync bug