Change ts sort algorithm to sortText