fix bugs for config