fixed errors in user model