fix hostname check