Fixing issue with new sortAsc, sortDesc core functions