Fixed bugs for user sync