Hotfix search tasks

Fixes error when no tasks were found to match search criteria.