diff --git a/generators/oar-properties/oar-properties-check.rb b/generators/oar-properties/oar-properties-check.rb
index 1da37ad949d9e543ffac8d4cacc62992ba9cce3d..c27b10f1394f25903767910cdb8f02c1a983a454 100755
--- a/generators/oar-properties/oar-properties-check.rb
+++ b/generators/oar-properties/oar-properties-check.rb
@@ -28,6 +28,7 @@ end
 def parse_command_line_parameters
   options = {}
   options[:sites] = %w(grenoble lille luxembourg lyon nancy nantes rennes sophia)
+  options[:clusters] = []
 
   OptionParser.new do |opts|
     opts.banner = 'Usage: oar-properties-check.rb [options]'
@@ -100,7 +101,8 @@ options[:sites].each do |site|
   # for each host ...
   default_resources.map { |e| e['host'] }.uniq.each do |host|
     host_resources = default_resources.select { |e| e['host'] == host }
-    next if options[:clusters] and not options[:clusters].include?(host_resources['cluster'])
+    cluster = host_resources.first['cluster']
+    next if not options[:clusters].empty? and not options[:clusters].include?(cluster)
 
     # compute nbcores.
     # cpucore is cores per cpu. to know the number of cpus, we devide memnode per memcpu.