Fixed issues in the profile service