Fix alias profile bug when creating agent.