diff --git a/src/main/java/ui/GTURTLEModeling.java b/src/main/java/ui/GTURTLEModeling.java
index dfc2412b803e668c46a25de006e5fb59be3e1700..a98380247e0483352e01cc1440b77584ca6caee6 100755
--- a/src/main/java/ui/GTURTLEModeling.java
+++ b/src/main/java/ui/GTURTLEModeling.java
@@ -2035,10 +2035,12 @@ public class GTURTLEModeling {
             HashMap<AvatarPragmaAuthenticity, ProVerifQueryAuthResult> authResults = pvoa.getAuthenticityResults();
             for (AvatarPragmaAuthenticity pragma: authResults.keySet()) {
                 if (authResults.get(pragma).isProved() && !authResults.get(pragma).isSatisfied()) {
-                    nonAuthChans.add(pragma.getAttrA().getAttribute().getBlock().getName() + "__" + pragma.getAttrA().getState().getName().replaceAll("_chData", ""));
-                    nonAuthChans.add(pragma.getAttrB().getAttribute().getBlock().getName() + "__" + pragma.getAttrB().getState().getName().replaceAll("_chData", ""));
+                    nonAuthChans.add(pragma.getAttrA().getAttribute().getBlock().getName() + "__" + pragma.getAttrA().getAttribute().getName().replaceAll("_chData", ""));
+                    nonAuthChans.add(pragma.getAttrB().getAttribute().getBlock().getName() + "__" + pragma.getAttrB().getAttribute().getName().replaceAll("_chData", ""));
                 }
             }
+			TraceManager.addDev("nonsecchans " + nonSecChans);
+			TraceManager.addDev("nonauthchans " + nonAuthChans);
             TraceManager.addDev("all results displayed");
 
         }
@@ -2124,7 +2126,7 @@ public class GTURTLEModeling {
                         TMLChannel chan = tmlmodel.getChannelByName(tabName+"__"+writeChannel.getChannelName());
                         //System.out.println("channel " + chan);
                         if (chan!=null){
-                            if (chan.checkConf){
+                            if (chan.checkConf && autoConf){
                                 //        System.out.println(chan.getOriginTask().getName().split("__")[1]);
                                 if (nonSecChans.contains(chan.getOriginTask().getName().split("__")[1]+"__"+writeChannel.getChannelName()+"_chData") && !secInChannels.get(chan.getDestinationTask()).contains(writeChannel.getChannelName())){
                                     //                                                                                            if (!securePath(map, chan.getOriginTask(), chan.getDestinationTask())){
diff --git a/src/main/java/ui/window/JDialogProverifVerification.java b/src/main/java/ui/window/JDialogProverifVerification.java
index d2224ede7ea22cd7561d001e4881c216af38ba61..0a9b4738716f005f0b5da88cc0e8384e7aabb814 100644
--- a/src/main/java/ui/window/JDialogProverifVerification.java
+++ b/src/main/java/ui/window/JDialogProverifVerification.java
@@ -61,6 +61,9 @@ import proverifspec.ProVerifOutputListener;
 import ui.AvatarDesignPanel;
 import ui.util.IconManager;
 import ui.MainGUI;
+import ui.TURTLEPanel;
+import ui.TMLArchiPanel;
+
 import ui.interactivesimulation.JFrameSimulationSDPanel;
 import tmltranslator.*;
 
@@ -106,6 +109,10 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
     public final static int REACHABILITY_SELECTED   = 2;
     public final static int REACHABILITY_NONE       = 3;
 
+
+	TURTLEPanel currPanel;
+		
+
     int mode;
     
     
@@ -134,7 +141,8 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
     
     //security generation buttons
     ButtonGroup secGroup;
-    protected JCheckBox autoConf, autoWeakAuth, autoStrongAuth, autoMapKeys, custom, addHSM;
+	
+    protected JCheckBox autoSec, autoConf, autoWeakAuth, autoStrongAuth, autoMapKeys, custom, addHSM;
 
     protected JTextField encTime, decTime, secOverhead;
 	protected JComboBox<String> addtoCPU;
@@ -210,6 +218,8 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
 				taskCpuMap.put(task,cpu);
 			}
 		}
+		currPanel = mgui.getCurrentTURTLEPanel();
+		
         initComponents();
         myInitComponents();
         pack();
@@ -271,9 +281,13 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
 
         //genJava.addActionListener(this);
 		secGroup=new ButtonGroup(); 
+        autoSec= new JCheckBox("Add security");
+		jp02.add(autoSec, c01);
+		autoSec.addActionListener(this);
+		secGroup.add(autoSec);
         autoConf= new JCheckBox("Add security (Confidentiality)");
-		secGroup.add(autoConf);
         jp02.add(autoConf, c01);
+		autoConf.setEnabled(false);
 		autoConf.addActionListener(this);
         autoWeakAuth= new JCheckBox("Add security (Weak Authenticity)");
 		autoWeakAuth.setEnabled(false);
@@ -501,8 +515,10 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
 
         jp1.add("Security Verification", jp01);
         
-        jp1.add("Automated Security", jp02);
-        
+		if (currPanel instanceof TMLArchiPanel){
+			//Can only secure a mapping
+	        jp1.add("Automated Security", jp02);
+		}        
         c.add(jp1, BorderLayout.NORTH);
         c.add(jp2, BorderLayout.SOUTH);
 
@@ -658,9 +674,16 @@ public class JDialogProverifVerification extends JDialog implements ActionListen
 			if (evt.getSource() == addHSM){
 				listPanel.setEnabled(addHSM.isSelected());
 			}
-			if (evt.getSource() == autoConf || evt.getSource() == autoMapKeys || evt.getSource() == addHSM || evt.getSource()==autoWeakAuth){	
-				autoWeakAuth.setEnabled(autoConf.isSelected());
+			if (evt.getSource() == autoConf || evt.getSource() == autoSec ||evt.getSource() == autoMapKeys || evt.getSource() == addHSM || evt.getSource()==autoWeakAuth){	
+				//autoWeakAuth.setEnabled(autoConf.isSelected());
+				autoConf.setEnabled(autoSec.isSelected());
+				autoWeakAuth.setEnabled(autoSec.isSelected());
 				autoStrongAuth.setEnabled(autoWeakAuth.isSelected());
+				if (!autoSec.isSelected()){
+					autoConf.setSelected(false);
+					autoWeakAuth.setSelected(false);
+					autoStrongAuth.setSelected(false);
+				}
 			}
 			if (evt.getSource() == custom){
 				encTime.setEnabled(custom.isSelected());