be smarter about host setting