bug fix in user model