diff --git a/haas-imagej-client/src/main/java/cz/it4i/fiji/haas/ui/ProgressDialog.java b/haas-imagej-client/src/main/java/cz/it4i/fiji/haas/ui/ProgressDialog.java
index 6b7b453d5c418640bf3c111a0b2a0e75f7ccb5e0..93ad84c8caeaf3a21849ad29d8b5a489ac80af6a 100644
--- a/haas-imagej-client/src/main/java/cz/it4i/fiji/haas/ui/ProgressDialog.java
+++ b/haas-imagej-client/src/main/java/cz/it4i/fiji/haas/ui/ProgressDialog.java
@@ -49,10 +49,14 @@ public class ProgressDialog extends JDialog implements Progress {
 	public ProgressDialog(final Window owner) {
 		this(owner, null);
 	}
+	
+	public ProgressDialog(Window owner, String title) {
+		this(owner, title, null);
+	}
 
-	public ProgressDialog(final Window owner, final String title) {
+	public ProgressDialog(final Window owner, final String title, Runnable cancelableAction) {
 		super(owner, title);
-
+		boolean canCancel = cancelableAction != null;
 		final Container root = getContentPane();
 		root.setLayout(new BoxLayout(root, BoxLayout.Y_AXIS));
 		progress = new JProgressBar();
@@ -77,9 +81,12 @@ public class ProgressDialog extends JDialog implements Progress {
 			public void actionPerformed(final ActionEvent e) {
 				canceled = true;
 				ProgressDialog.this.dispose();
+				cancelableAction.run();
 			}
 		});
-		// buttons.add(cancel);
+		if(canCancel) {
+			buttons.add(cancel);
+		}
 		buttons.setMaximumSize(buttons.getMinimumSize());
 		root.add(buttons);
 
diff --git a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/commands/ManageSPIMBenchmark.java b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/commands/ManageSPIMBenchmark.java
index 7dd54e7f9983829f82270d4bee2c4853bd25962c..9f4ee84015e440a668e12371e454a49405016087 100644
--- a/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/commands/ManageSPIMBenchmark.java
+++ b/haas-spim-benchmark/src/main/java/cz/it4i/fiji/haas_spim_benchmark/commands/ManageSPIMBenchmark.java
@@ -86,7 +86,7 @@ public class ManageSPIMBenchmark implements Command {
 		final ImageJ ij = new ImageJ();
 		ij.launch(args);
 
-		ij.command().run(ManageSPIMBenchmark.class, true);
+		//ij.command().run(ManageSPIMBenchmark.class, true);
 	}
 
 }