Fix sorting scope