fix subtask generation