Fix sorting to work across sheets