           return counter = 0
 
         done &&= _done
-
-        if _declarations.length
-          allDeclarations = allDeclarations.concat(_declarations)
-
-        if _clear.length
-          allClear = allClear.concat(_clear)
+        allDeclarations[j] = _declarations or []
+        allClear[j] = _clear or []
 
         if (counter -= 2) == 1
+          allDeclarations = Array.prototype.concat.apply([], allDeclarations)
+          allClear = Array.prototype.concat.apply([], allClear)
           return callback(null, null, done, allDeclarations, allClear)
       )
 
   if (counter -= 2) == 1
+    allDeclarations = Array.prototype.concat.apply([], allDeclarations)
+    allClear = Array.prototype.concat.apply([], allClear)
     return callback(null, null, done, allDeclarations, allClear)
 
 

  allClear = []
  counter = 3
  allProvisions = provisionsCache.get(sessionContext)
  for provision in provisions
    if not allProvisions[provision[0]]?
      if defaultProvisions[provision[0]]
        done = defaultProvisions[provision[0]](sessionContext, provision, allDeclarations, startRevision, endRevision) and done
      continue

    counter += 2
    sandbox.run(allProvisions[provision[0]].script,
      {args: provision.slice(1)}, sessionContext, startRevision, endRevision,
      (err, _fault, _clear, _declarations, _done) ->
        if err or _fault

  allClear = []
  counter = 3
  allVirtualParameters = virtualParametersCache.get(sessionContext)
  for provision, j in provisions
    counter += 2
    globals = {TIMESTAMPS: provision[1], VALUES: provision[2]}
    do (j) -> sandbox.run(allVirtualParameters[provision[0]].script, globals,
      sessionContext, startRevision, endRevision,
      (err, _fault, _clear, _declarations, _done, _returnValue) ->
        if err or _fault
