diff --git a/R/api.R b/R/api.R
index 513af2b93c069b0a9027b82ed4c1fac232639856..342aaf37b024d74846d73a577661fd1135ed5d88 100644
--- a/R/api.R
+++ b/R/api.R
@@ -15,13 +15,11 @@
 
 ##' @export
 run <- function(fn_conf) {
-    conf <- read_conf(fn_conf)
-    dir.create(conf$project,
+    m <- new_state(fn_conf=fn_conf,
+                   GUI=F)    
+    dir.create(m$conf$project,
                showWarnings = F,
                recursive = T)
-
-    m <- new_state(conf=conf,
-                   GUI=F)    
     m <- withr::with_dir(new=conf$project,code = run_in_dir(m))
     return(invisible(m))
 }
diff --git a/R/mix.R b/R/mix.R
index 5f21974c5ccab8a5c7cc63c47c0cc7a186aad896..293fc42f1784ecea388ecb1bb56b263d334203f0 100644
--- a/R/mix.R
+++ b/R/mix.R
@@ -698,7 +698,6 @@ write_state <- function(m,fn_conf) {
     tab2file(tab=m$input$tab$mzml,file=file.path(m$conf$project,FN_DATA_TAB))
 }
 
-new_state <- function(conf,GUI) {
 read_conf <- function(fn) {
     cf <- yaml::yaml.load_file(fn)
     fnl <- cf$compound$lists
diff --git a/R/shiny-ui-base.R b/R/shiny-ui-base.R
index 418a0a6531eac1cc29bb2249ef597e827eab36de..7035d4b3f5cf49acc2ad5158458070b8eec88af9 100644
--- a/R/shiny-ui-base.R
+++ b/R/shiny-ui-base.R
@@ -103,7 +103,9 @@ list2rev <- function(lst) {
 
 new_rv_state <- function(project) {
     p <- normalizePath(path=project,winslash = '/')
-    x <- react_v(m=list2rev(new_state(list(project=p,data=""),GUI=T)))
+    nc <- new_conf()
+    nc$project <- project
+    x <- react_v(m=list2rev(new_state(conf=nc,GUI=T)))
     x
 }