fix bugs for demote error and devs not found when defined by configuration file