Persist tasks order after sorting