fixed bug with user profile vaidation and added a test for it