Fixed issues in user model file