 
   # Delete instance
   syncState.instancesToDelete.forEach((instances, parent) ->
-    instances.forEach((instance, index, thisArray) ->
+    instances.forEach((instance, key, thisSet) ->
       if rpcReq?
         completed = false
       else

          type: 'DeleteObject'
          objectName: instance.join('.') + '.'
        }
        thisArray.splice(index, 1)
    )
  )


          next: 'getInstanceKeys'
          instanceValues: instance
        }
        thisSet.delete(instance)
    )
  )

