diff --git a/install b/install
index 2a1df51a37eda301e0a0b1101393dd58431f48bd..7b492853dc706ecbd5ca578324f81360e8137279 100755
--- a/install
+++ b/install
@@ -17,7 +17,7 @@ if [ x"$HOME" == x"" ]; then
 fi
 
 install_req=1
-i_dir=" "
+i_dir=""
 sq=0
 nomake=0
 update_openfpm=0
@@ -503,8 +503,8 @@ if [ $conf_err -eq 0  ]; then
   echo -e "Install summary\033[92;5;1m SUCCEED \033[0m"
   
   ## Save dependencies dir and foward options
-  echo "$i_dir_old" > dependencies_dir
-  echo "$configure_options_old" > foward_options
+  printf "$i_dir_old" > dependencies_dir
+  printf "$configure_options_old" > foward_options
 
 else
   echo -e "Install summary\033[91;5;1m FAILED \033[0m"
diff --git a/script/update_openfpm b/script/update_openfpm
index 4cf1471fe22a4ec64413cf92adb25f9e6a6b7b25..844fed604145fd1511afb83736cff29a2405b61f 100755
--- a/script/update_openfpm
+++ b/script/update_openfpm
@@ -39,10 +39,10 @@ function update_openfpm()
   dir_prev_inst=$(cat dependencies_dir)
   for_opt=$(cat foward_options)
   if [ x"$dir_prev_inst" != x"" ]; then
-    dir_prev_inst="-i $dir_prev_inst"
+    dir_prev_inst="-i \"$dir_prev_inst\""
   fi
   if [ x"$for_opt" != x"" ]; then
-    for_opt="-c $for_opt"
+    for_opt="-c \"$for_opt\""
   fi