be smarter about local hostname