diff --git a/b_asic/gui_utils/plot_window.py b/b_asic/gui_utils/plot_window.py
index 96d6bda00e4697b08c62171d35e124ad1e689558..77babe1f7e732386b199581507e1ee88c50b5645 100644
--- a/b_asic/gui_utils/plot_window.py
+++ b/b_asic/gui_utils/plot_window.py
@@ -226,9 +226,10 @@ def start_simulation_dialog(
     sfg_name : str, optional
         The name of the SFG.
     """
-    QApplication(sys.argv)
+    app = QApplication(sys.argv)
     win = PlotWindow(sim_result=sim_results, sfg_name=sfg_name)
-    win.exec_()
+    win.show()
+    sys.exit(app.exec_())
 
 
 # Simple test of the dialog
diff --git a/b_asic/sfg_generators.py b/b_asic/sfg_generators.py
index 0e0d7929fcb4f12fb10e5e337613874c3b545796..e961e5344050124a4f4661967f291a2d7a53c29d 100644
--- a/b_asic/sfg_generators.py
+++ b/b_asic/sfg_generators.py
@@ -109,8 +109,8 @@ def wdf_allpass(
             latency_offsets=latency_offsets,
             execution_time=execution_time,
         )
-        Signal(adaptor2.output(1), adaptor1.input(1))
-        Signal(adaptor2.output(0), delay2)
+        Signal(adaptor2.output(0), adaptor1.input(1))
+        Signal(adaptor2.output(1), delay2)
         signal_out = Signal(adaptor1.output(0))
 
     output << signal_out