diff --git a/examples/thm_test.prj b/examples/thm_test.prj
index c95683c..f9984df 100644
--- a/examples/thm_test.prj
+++ b/examples/thm_test.prj
@@ -1,5 +1,6 @@
 <?xml version='1.0' encoding='ISO-8859-1'?>
 <OpenGeoSysProject>
+    <geometry>square_1x1_thm.gml</geometry>
     <mesh axially_symmetric="true">quarter_002_2nd.vtu</mesh>
     <processes>
         <process>
@@ -324,5 +325,4 @@
             </petsc>
         </linear_solver>
     </linear_solvers>
-    <geometry>square_1x1_thm.gml</geometry>
 </OpenGeoSysProject>
diff --git a/ogs6py/classes/python_script.py b/ogs6py/classes/python_script.py
index 07ef422..5a38080 100644
--- a/ogs6py/classes/python_script.py
+++ b/ogs6py/classes/python_script.py
@@ -16,6 +16,7 @@ class PythonScript(build_tree.BuildTree):
     def __init__(self, tree):
         self.tree = tree
         self.root = self._get_root()
+        self.populate_tree(self.root, "python_script", overwrite=True)
 
 
     def set_pyscript(self, filename):
diff --git a/ogs6py/ogs.py b/ogs6py/ogs.py
index 160a8ec..1ebc41d 100644
--- a/ogs6py/ogs.py
+++ b/ogs6py/ogs.py
@@ -89,7 +89,6 @@ def __init__(self, **args):
         self.mesh = mesh.Mesh(self.tree)
         self.processes = processes.Processes(self.tree)
         self.python_script = python_script.PythonScript(self.tree)
-        self.processes = processes.Processes(self.tree)
         self.media = media.Media(self.tree)
         self.time_loop = timeloop.TimeLoop(self.tree)
         self.local_coordinate_system = local_coordinate_system.LocalCoordinateSystem(self.tree)
@@ -146,8 +145,8 @@ def _get_root(self, remove_blank_text=False, remove_comments=False):
 
     def _remove_empty_elements(self):
         root = self._get_root()
-        empty_text_list = ["./geometry"]
-        empty_el_list = ["./time_loop/global_process_coupling"]
+        empty_text_list = ["./geometry", "./python_script"]
+        empty_el_list = ["./time_loop/global_process_coupling", "./curves"]
         for element in empty_text_list:
             entry = root.find(element)
             if entry.text == "":