fixed host sort (via Lawrence Chen)