Added most of the task resubmitting