diff --git a/Tst/codeblockreusefeature/codeblockreuse.py b/Tst/codeblockreusefeature/codeblockreuse.py
index c585798a4881136bca6acbca2b1ec0e5fbb97cf8..3f81839eee16f8dc397539e62ddbf311f46989ee 100755
--- a/Tst/codeblockreusefeature/codeblockreuse.py
+++ b/Tst/codeblockreusefeature/codeblockreuse.py
@@ -769,8 +769,9 @@ class CBRSearch(Gtk.Box):
         Loads the data from the database. The filter properties are used to build the SQL query.
         """
         self.logger.debug('Loading data from the database')
+        self.session.commit()  # this updates the session instantiated in the class init
         if self.filter_searchstring != '':
-            self.data = db_interaction.query_using_textsearch(session=self.session, expressions=searchstring)
+            self.data = db_interaction.query_using_textsearch(session=self.session, expressions=self.filter_searchstring)
         else:
             self.data = db_interaction.query_get_all_entries(self.session)
         self.load_data_into_liststore(self.data)