Fixed issue with sort-clauses not treating symbols properly