diff --git a/src/View/Study/Window.py b/src/View/Study/Window.py
index e8b9c7f83791ae14e05671d78958a78771669461..bfb615d1ecb99fe853ffbc9f5565c04d38e9a55e 100644
--- a/src/View/Study/Window.py
+++ b/src/View/Study/Window.py
@@ -101,4 +101,5 @@ class NewStudyWindow(PamhyrDialog):
                 self._study.use_date(date)
             else:
                 self._study.use_time()
+
         self.done(True)
diff --git a/src/View/Tools/ListedSubWindow.py b/src/View/Tools/ListedSubWindow.py
index 7fe21bb7bfab7cf0b1a40d3b5fac61ca8fff8792..d0b833b8efa46a7179f86e746b66c6bcc0c1f98b 100644
--- a/src/View/Tools/ListedSubWindow.py
+++ b/src/View/Tools/ListedSubWindow.py
@@ -55,11 +55,12 @@ class ListedSubWindow(object):
         logger.info(f"Close window: ({h}) {self.sub_win_cnt}")
 
     def _sub_win_exists(self, h):
-        return reduce(
+        res = reduce(
             lambda acc, el: (acc or (h == (el[1].hash()))),
             self.sub_win_list,
             False
         )
+        return res
 
     def sub_win_exists(self, h):
         return self._sub_win_exists(h)
diff --git a/src/View/Tools/PamhyrWindow.py b/src/View/Tools/PamhyrWindow.py
index 74756167b65b01ebefb02a9f996095d28ced6923..87829b8dad058c0933a2285c5f2a273d950bf5e7 100644
--- a/src/View/Tools/PamhyrWindow.py
+++ b/src/View/Tools/PamhyrWindow.py
@@ -186,3 +186,8 @@ class PamhyrDialog(ASubWindow, ListedSubWindow, PamhyrWindowTools):
         self._hash_data.append(self._config)
 
         self._set_title()
+
+    def done(self, result):
+        if self.parent is not None:
+            self.parent.sub_win_del(self.hash())
+        super(PamhyrDialog, self).done(result)