diff --git a/lib/assets/javascripts/surveyor_gui/surveyor_gui.js b/lib/assets/javascripts/surveyor_gui/surveyor_gui.js
index <HASH>..<HASH> 100644
--- a/lib/assets/javascripts/surveyor_gui/surveyor_gui.js
+++ b/lib/assets/javascripts/surveyor_gui/surveyor_gui.js
@@ -761,7 +761,7 @@ function application_js_code(){
         var last_rule = rule_keys[rule_keys.length-1];
 
         var rule_keys_excluding_z = $.map(rule_keys,function(a){return a.value==="Z" ? null : a.value}).sort()
-        var max_key_value = rule_keys_excluding_z[rule_keys.length-2];
+        var max_key_value = rule_keys_excluding_z[rule_keys.length-1];
 
         var char_no = max_key_value.charCodeAt() + 1;
Fixed inability to add more than two rules to a question

	modified:   lib/assets/javascripts/surveyor_gui/surveyor_gui.js - changed index to length-1 instead of length-2