fixed bug with user profile validation - I am still not confident in it though.