Added protection against TASK_FAIL messages