Fix a couple of lint errors and simplify hostname check