Corrected a bug with user profile validation