fix bugs with different hosts