fix some bugs, add host list support