Ignore the fix in previous file, while it solved the syntax error, it removed the sort. The actual problem is further along in the file change. See attached.

More...