fix a potential bug
improve config