Fix use of tasks for search