Finally fixed the bug with user profile validation