         @executing = false
 
         # Load options from local storage
-        if window.localStorage?.options?
+        if window.localStorage?
             try
-                dataexplorer_state.options = JSON.parse window.localStorage.options
+                @state.options = JSON.parse(window.localStorage.options)
+                # Ensure no keys are without a default value in the
+                # options object
+                _.defaults(@state.options, DEFAULTS.options)
             catch err
                 window.localStorage.removeItem 'options'
+            # Whatever the case with default values, we need to sync
+            # up with the current application's idea of the options
+            window.localStorage.options = JSON.stringify(@state.options)
 
         # Load the query that was written in code mirror (that may not have been executed before)
         if typeof window.localStorage?.current_query is 'string'

        if @_patched_already
            return
        iterableProto = @query_result.cursor?.__proto__?.__proto__?.constructor?.prototype
        if iterableProto?.stackSize > 30
            console.log "Patching stack limit on cursors to 30"
            iterableProto.stackSize = 30
            @_patched_already = true



        query_limit: 40
    history: []
    focus_on_codemirror: true

Object.freeze(DEFAULTS)
Object.freeze(DEFAULTS.options)
# state is initially a mutable version of defaults. It's modified later
dataexplorer_state = _.extend({}, DEFAULTS)

# This class represents the results of a query.
#
