Fix index mismatch in task context menu.