 		}
 		
 		private function targetAddedHandler(ctrl	: AbstractController,
-											target	: Group) : void
+											target	: Mesh) : void
 		{
-			var numChildren : uint = target.numChildren;
+			var skinningCtrl : SkinningController = target.getControllersByType(SkinningController)[0]
+				as SkinningController;
+			
+			for each (var joint : Group in skinningCtrl.joints)
+				addBonesAndJointsMeshes(joint);
+		}
+		
+		private function targetRemovedHandler(ctrl 		: AbstractController,
+											  target	: Mesh) : void
+		{
+			var skinningCtrl : SkinningController = target.getControllersByType(SkinningController)[0]
+				as SkinningController;
+			
+			for each (var joint : Group in skinningCtrl.joints)
+			{
+				joint.getChildByName('__bone__').parent = null;
+				joint.getChildByName('__joint__').parent = null;
+			}
+		}
+		
+		private function addBonesAndJointsMeshes(joint : Group) : void
+		{
+			if (joint.getChildByName('__bone__') || joint.getChildByName('__joint__'))
+				return ;
+			
+			var numChildren : uint = joint.numChildren;
 			
 			for (var i : uint = 0; i < numChildren; ++i)
 			{
-				var child : Group = target.getChildAt(i) as Group;
+				var child : Group = joint.getChildAt(i) as Group;
 				
 				if (child != null)
 				{

					);
					
					jointMesh.transform.appendUniformScale(.08);
					target.addChild(jointMesh);
					
					if (boneLength != 0.)
					{

		public function JointsDebugController(jointsMaterial	: Material	= null,
											  bonesMaterial		: Material	= null)
		{
			super(Mesh);
			
			initialize(jointsMaterial, bonesMaterial);
		}
