Fixed a bug relating to profile name validation