Corrected inverse priority sorting