fixed problem with multiple sequential sorts