fixed incorrect sorting in postprocessing