Fix bug in User model