Set task dispatcher properly during learning.