Fixed bugs related to profiles with spaces