Bugfix in task pool