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

Fixed bugs for user sync