fix a bug about sync