Fixed memory leak in Tasks when child tasks are continually created