Changed the way that the hosts are sorted