filter out invalid hosts