diff --git a/R/api.R b/R/api.R
index 901fd8f1f99c9b0553cf4bad9dce1eda753e637b..ae7cdcec82e068627e9c19bea01e5b60dba1903c 100644
--- a/R/api.R
+++ b/R/api.R
@@ -22,8 +22,8 @@ run <- function(fn_conf) {
 
     m <- new_state(conf=conf,
                    GUI=F)    
-    withr::with_dir(new=conf$project,code = run_in_dir(m))
-    return()
+    m <- withr::with_dir(new=conf$project,code = run_in_dir(m))
+    return(invisible(m))
 }