Fixed a bug with user profile validation