diff --git a/lib/gcli/ui/inputter.js b/lib/gcli/ui/inputter.js
index <HASH>..<HASH> 100644
--- a/lib/gcli/ui/inputter.js
+++ b/lib/gcli/ui/inputter.js
@@ -355,6 +355,9 @@ Inputter.prototype.onKeyUp = function(ev) {
       this._caretChange = Caret.TO_ARG_END;
       var inputState = this.getInputState();
       this._processCaretChange(inputState);
+      if (this._choice == null) {
+        this._choice = 0;
+      }
       this.requisition.complete(inputState.cursor, this._choice);
     }
     this.lastTabDownAt = 0;
Bug <I> (updown): Prevent completion error
this._choice == null is valid, but not when we want to complete
the default choice.