Fix error when no tasks have been found