config bug+new logic