Some minor fixes for User model