Fix sorting when frozen columns. Thanks to Thomas Young