Fix AutoFactory for class autoconfigured, make classes' config_name work.