avoiding side effect of profile selection (refs #337)