restored MAX_TASKS