better empty hosts check