diff --git a/Rakefile b/Rakefile
index ce60b77d9697cfb7ddbb5a938a97a265b438bc04..9c95690dfc3d083bbc3be030e89ef57d7c6923f6 100644
--- a/Rakefile
+++ b/Rakefile
@@ -85,13 +85,18 @@ namespace :oar do
         if action == "M"  # modification of a file
           command.concat(" -s node=#{host} ")
         else              # new file
-          command.concat(" -a node=#{host}/cpu={#{node.properties['architecture']['smp_size']}}/core={#{export['cpucore']}} ")
+          command.concat(" -a /node=#{host}/cpu={#{node.properties['architecture']['smp_size']}}/core={#{export['cpucore']}}")
+          command.concat(" --auto-offset")
+          if ENV['MAINTENANCE'] && ENV['MAINTENANCE']=='NO'
+            command.concat(' -p maintenance="NO"')
+          else
+            # by default, maintenance is YES when creating new resources
+            command.concat(' -p maintenance="YES"')
+          end
         end
         command.concat(" -p ").concat( export.to_a.map{|(k,v)|
           if v.nil?
             nil
-          elsif v.kind_of?(String) && v =~ / / # to remove after oaradmin correctly parses options
-            [k, v.inspect.inspect].join("=")
           else
             [k, v.inspect].join("=")
           end
@@ -102,6 +107,11 @@ namespace :oar do
         @logger.warn "Don't know what to do with #{line.inspect}. Ignoring."
         next
       end
+      
+      if ENV['COMMIT'] && ENV['COMMIT']=='YES'
+        command.concat(' -c')
+      end
+      
       commands << command
     end
     commands.each do |command|