use last subtask index instead of subtask number