Fix profile name validation bug