Fix bug with sorting tasks in a search list