 			// convert the array of record keys into array of anchors
 			for(index = 0; index < recordKeys.length; index++)
 			{
-				var anchor:AnchorPoint = recordKeys[index] as AnchorPoint;
+				 anchor = anchors.getObject(recordKeys[index].localName) as AnchorPoint;
 				
 				if (recordKeys[index].keyType != ANCHOR_KEYTYPE || !anchor)
 					continue;
 				
-				anchors.push(anchor);
+				_anchors.push(anchor);
 			}
 			
 			// sort by polar angle
-			anchors.sort(anchorCompareFunctionByPolarAngle);
+			_anchors.sort(anchorCompareFunctionByPolarAngle);
 			
 			// draw convex hull
-			for(index = 0; index < anchors.length - 1; index++)
-			{
-				anchor1 = anchors[index];
-				anchor2 = anchors[index];
-				
+			for(index = 0; index < _anchors.length - 1; index++)
+			{
+				anchor1 = _anchors[index];
+				anchor2 = _anchors[index + 1];
 				p1.x = anchor1.x.value; p1.y = anchor1.y.value;
 				p2.x = anchor2.x.value;p2.y = anchor2.y.value;
 				dataBounds.projectPointTo(p1, screenBounds);

			var graphics:Graphics = g;
			var anchor1:AnchorPoint;
			var anchor2:AnchorPoint;
			var anchors:Array = [];
			var index:int;
			var p1:Point = new Point();
			var p2:Point = new Point();0

			}
			
			// draw the last connecting line between the last anchor and the first one.
			p1.x = _anchors[_anchors.length - 1].x.value; p1.y = _anchors[_anchors.length - 1].y.value;
			p2.x = _anchors[0].x.value; p2.y = _anchors[0].y.value;
			
			dataBounds.projectPointTo(p1, screenBounds);
			dataBounds.projectPointTo(p2, screenBounds);
