[C] Fix issues with task searching