Alternative fix for LocalCorr sorting