Fix creation of taskInstances