Fix Task's constructor.