Fix sorting and Region Spliting.