         //calc initial length
         currentLength = calculateLength();
     }
-	
-	/**
-	 *  @private
-	 *  
-	 *  Update the parent map and adjust the length.
-	 */ 
-	private function updateParentMapAndLength(collection:ICollectionView, node:Object):void
-	{
-		var cursor:IViewCursor = collection.createCursor();
-		currentLength += collection.length;
-		
-		while (!cursor.afterLast)
-		{
-			var item:Object = cursor.current;
-			var uid:String = UIDUtil.getUID(item);
-			parentMap[uid] = node;
-			
-			// check that the node is opened or not.
-			// If it is open, then update the length with the node's children.
-			if (_openNodes[uid] != null)
-			{
-				var childrenCollection:ICollectionView = getChildren(item);
-				if (childrenCollection)
-					updateParentMapAndLength(childrenCollection, item);
-			}
-			
-			try
-			{
-				cursor.moveNext();
-			}
-			catch (e:ItemPendingError)
-			{
-				break;
-			}
-		}
-	}
+    
+    /**
+     *  @private
+     *  
+     *  Update the parent map and adjust the length.
+     */ 
+    private function updateParentMapAndLength(collection:ICollectionView, node:Object):void
+    {
+        var cursor:IViewCursor = collection.createCursor();
+        currentLength += collection.length;
+        
+        while (!cursor.afterLast)
+        {
+            var item:Object = cursor.current;
+            var uid:String = UIDUtil.getUID(item);
+            parentMap[uid] = node;
+            
+            // check that the node is opened or not.
+            // If it is open, then update the length with the node's children.
+            if (_openNodes[uid] != null)
+            {
+                var childrenCollection:ICollectionView = getChildren(item);
+                if (childrenCollection)
+                    updateParentMapAndLength(childrenCollection, item);
+            }
+            
+            try
+            {
+                cursor.moveNext();
+            }
+            catch (e:ItemPendingError)
+            {
+                break;
+            }
+        }
+    }
     
     /**
      *  @private

        if (event is CollectionEvent)
        {
            var ce:CollectionEvent = CollectionEvent(event);
			if (ce.kind == CollectionEventKind.REFRESH)
			{
				// collection refreshed, update length
				updateLength();
			}
			else if (ce.kind == CollectionEventKind.RESET)
            {
                // initialize the collection again - its source is modified
                if (hierarchicalData)

            // watch for page faults
            var modelCursor:IViewCursor = treeData.createCursor();
            if (modelCursor.beforeFirst)
            {
                // indicates that an IPE occured on the first item
                return treeData.length;
            }
            while (!modelCursor.afterLast)
            {
                node = modelCursor.current;
                if (node is XML)
                {
                    if (firstNode)
                    {   
                        firstNode = false;
                        var parNode:* = node.parent();
                        if (parNode != null)
                        {
                            startTrackUpdates(parNode);
                            childrenMap[parNode] = treeData;
                            parentNode = parNode;
                        }
                    }
                    startTrackUpdates(node);
                }
                if (node === null)
                    length += 1;
                else
                    length += calculateLength(node, null) + 1;
                modelOffset++;
                try
                {
