Fix bug in sorting with external files