Improved profile name handling