diff --git a/tsgqc_GUI.m b/tsgqc_GUI.m
index 5d432f6ca1e15e679e1660cf6ce3a7970e9cc7ea..f07ec9a8300b2c7b675a68f03145a0beeff37c5a 100644
--- a/tsgqc_GUI.m
+++ b/tsgqc_GUI.m
@@ -1078,7 +1078,7 @@ tsg_initialisation(hMainFig, hQcCmenu)
     % Callback function run when the Quit menu item is selected
 
     % If the data have been modified and not save, the program
-    % propose to save the data
+    % ask to save the data
     % --------------------------------------------------------
     if  strcmp( get( hSaveMenu, 'UserData' ), 'on')
       selection = ...
@@ -1107,9 +1107,16 @@ tsg_initialisation(hMainFig, hQcCmenu)
 % ----------------------------------------------------------------
   function QuitProgram(hObject, eventdata)
 
+    % needed during QC operation if waitbuttonpress is active
+    % -------------------------------------------------------
+    uiresume;
+    
+    % close the main windows
+    % ----------------------
     delete(hMainFig);
 
     % reset Matlab search path to default
+    % -----------------------------------
     rmpath( [DEFAULT_PATH_FILE filesep 'tsg_util'] );
     rmpath( [DEFAULT_PATH_FILE filesep 'tsg_data'] );
     rmpath( [DEFAULT_PATH_FILE filesep 'tsg_io'] );