diff --git a/gga_run_workflow_phaeo_jbrowse.py b/gga_run_workflow_phaeo_jbrowse.py
index b7a9a24e91385c3bda8532ff7045e166d0a366ba..f73976f51cbf94e082e9d1163e86a9c077b9d406 100644
--- a/gga_run_workflow_phaeo_jbrowse.py
+++ b/gga_run_workflow_phaeo_jbrowse.py
@@ -171,7 +171,7 @@ class RunWorkflowJbrowse(runWorkflowPhaeo.RunWorkflow):
 
         return org_id
 
-    def import_datasets_into_history(self):
+    def import_datasets_into_history(self, config):
         """
         Find datasets in a library, get their ID and import them into the current history if they are not already
         """
@@ -187,8 +187,8 @@ class RunWorkflowJbrowse(runWorkflowPhaeo.RunWorkflow):
         proteins_hda_id = None
 
         gio = GalaxyInstance(url=self.instance_url,
-                             email=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL],
-                             password=self.config[constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD]
+                             email=config[constants.CONF_GALAXY_DEFAULT_ADMIN_EMAIL],
+                             password=config[constants.CONF_GALAXY_DEFAULT_ADMIN_PASSWORD]
                              )
         prj_lib = gio.libraries.get_previews(constants.GALAXY_LIBRARY_NAME)
         if len(prj_lib) == 1:
@@ -284,7 +284,7 @@ def prepare_history_and_get_wf_param(sp_dict_list, main_dir, config):
             run_workflow_for_current_organism.set_galaxy_instance(config)
             run_workflow_for_current_organism.set_history()
             run_workflow_for_current_organism.install_individual_tools()
-            run_workflow_for_current_organism.import_datasets_into_history()
+            run_workflow_for_current_organism.import_datasets_into_history(config)
 
             analyses_dict_list = run_workflow_for_current_organism.get_analyses()