fixed some bugs for config