Corrected bug in the summary export: results were not sorted correctly