diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp
index 919276998d1195303ec9b80e41f17a90b6bfd465..32a47f48bd26966bab6cbc90214d7d045977bfb0 100644
--- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp
+++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.cpp
@@ -261,29 +261,41 @@ namespace armarx
         {
             SoPath* path = selectionNode->getPath(i);
 
-            std::string name = path->getTail()->getName().getString();
-            if (name.length() > 0 && name.find(SELECTION_NAME_PREFIX) == 0)
+            for (unsigned int j = 0; j < path->getLength(); j++)
             {
-                int index = name.rfind(SELECTION_NAME_SPLITTER);
-                name = name.substr(index + strlen(SELECTION_NAME_SPLITTER));
+                SoNode* node = path->getNodeFromTail(j);
+                if (!node)
+                {
+                    continue;
+                }
 
-                // Check if selected element is 'selectable'
-                for (auto& l : layers)
+                std::string name = node->getName().getString();
+                if (name.length() > 0 && name.find(SELECTION_NAME_PREFIX) == 0)
                 {
-                    std::string layer = l.first;
-                    if (layers[layer].addedBoxVisualizations.find(name) != layers[layer].addedBoxVisualizations.end()
-                        || layers[layer].addedTextVisualizations.find(name) != layers[layer].addedTextVisualizations.end()
-                        || layers[layer].addedSphereVisualizations.find(name) != layers[layer].addedSphereVisualizations.end()
-                        || layers[layer].addedCylinderVisualizations.find(name) != layers[layer].addedCylinderVisualizations.end()
-                        || layers[layer].addedPolygonVisualizations.find(name) != layers[layer].addedPolygonVisualizations.end())
-                    {
-                        DebugDrawerSelectionElement e;
-                        e.layerName = layer;
-                        e.elementName = name;
+                    int index = name.rfind(SELECTION_NAME_SPLITTER);
+                    name = name.substr(index + strlen(SELECTION_NAME_SPLITTER));
 
-                        selectedElements.push_back(e);
-                        break;
+                    // Check if selected element is 'selectable'
+                    for (auto& l : layers)
+                    {
+                        std::string layer = l.first;
+                        if (layers[layer].addedBoxVisualizations.find(name) != layers[layer].addedBoxVisualizations.end()
+                            || layers[layer].addedTextVisualizations.find(name) != layers[layer].addedTextVisualizations.end()
+                            || layers[layer].addedSphereVisualizations.find(name) != layers[layer].addedSphereVisualizations.end()
+                            || layers[layer].addedCylinderVisualizations.find(name) != layers[layer].addedCylinderVisualizations.end()
+                            || layers[layer].addedPolygonVisualizations.find(name) != layers[layer].addedPolygonVisualizations.end())
+                        {
+                            DebugDrawerSelectionElement e;
+                            e.layerName = layer;
+                            e.elementName = name;
+
+                            selectedElements.push_back(e);
+                            break;
+                        }
                     }
+
+                    // We only process the first node that matches the naming scheme
+                    break;
                 }
             }
         }