added check for hostid/hostname