diff --git a/src/main/java/ui/TDiagramPanel.java b/src/main/java/ui/TDiagramPanel.java
index a701d376aef3d7b7934ddb33acd835f2de040c88..0d78e6bf5192cc0b4c21930d8df2d8f300b9bd33 100644
--- a/src/main/java/ui/TDiagramPanel.java
+++ b/src/main/java/ui/TDiagramPanel.java
@@ -1380,7 +1380,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
     public Vector<TMLCPrimitiveComponent> selectedCPrimitiveComponent() {
         Vector<TMLCPrimitiveComponent> v = null;
 
-        for (TGComponent tgc : this.getAllComponent()){
+        for (TGComponent tgc : this.getAllComponentList()){
             if (tgc.isSelected()) {
                 if (tgc instanceof TMLCPrimitiveComponent) {
                     if (v == null)
@@ -2561,7 +2561,7 @@ public abstract class TDiagramPanel extends JPanel implements GenericTree {
     public int getMaxIdSelected() {
         int ret = 0;
         //issue 186
-        for (TGComponent tgc : this.getAllComponent())
+        for (TGComponent tgc : this.getAllComponentList())
             if (tgc.isSelected())
                 ret = Math.max(ret, tgc.getMaxId());
         return ret;
diff --git a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java
index 9c45c4de51ad9092811b68dbc381aa6cb99c0e36..18b15d556cd5414bc3f271617108fd0a746c3712 100644
--- a/ttool/src/test/java/ui/TDiagramPanelCloneTest.java
+++ b/ttool/src/test/java/ui/TDiagramPanelCloneTest.java
@@ -49,7 +49,7 @@ public class TDiagramPanelCloneTest extends AbstractUITest {
             }
         }
 
-        for (TGComponent tgc : diagramPanel.getAllComponent()) {
+        for (TGComponent tgc : diagramPanel.getAllComponentList()) {
             if (tgc.getValue().equals("CompositeComp1")) {
                 tgComponent1 = tgc;
             }