fix a bug when updating user model