#2748 fixed ordering issue when getting hosts