Fixed bugs for user sync
Merge pull request #179 from taiwen/user

Fixed bugs for user sync