diff --git a/MXF-Track-Swap.au3 b/MXF-Track-Swap.au3
index dd55d193cd7377f62b698883a38d008836964fe9..2c5ffcae544c5d3c6e5541b9540167f026943a49 100644
--- a/MXF-Track-Swap.au3
+++ b/MXF-Track-Swap.au3
@@ -3,7 +3,7 @@
 #AutoIt3Wrapper_UseX64=n
 #AutoIt3Wrapper_Res_Comment=Swaps audio tracks in mxf files.
 #AutoIt3Wrapper_Res_Description=Swaps audio tracks in mxf files.
-#AutoIt3Wrapper_Res_Fileversion=1.0.0.10
+#AutoIt3Wrapper_Res_Fileversion=1.0.0.11
 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
 #AutoIt3Wrapper_Res_LegalCopyright=Conrad Zelck
 #AutoIt3Wrapper_Res_SaveSource=y
@@ -633,7 +633,13 @@ Global $g_sStdErrAll
 
 _ReWrap()
 ShellExecute(@TempDir)
-
+While True
+    Switch GUIGetMsg()
+        Case $GUI_EVENT_CLOSE
+            ExitLoop
+    EndSwitch
+WEnd
+GUIDelete($g_hGUI)
 Exit
 
 ;~ #cs