fix hostsinagreement bug