fixed handling of profiles in generators - allow empty name/undefined
profile
fixed retrieval of default profile