added a fall back if a task is missing in the context