sort tasks before appear