some fixes for rank sorting in HEFT