Better hosttype detection