                         @results_view.render_error(@raw_queries[@index-1], error)
                         @save_query
                             query: @raw_query
-                            broken: true
+                            broken_query: true
 
         
         rdb_global_callback: (error, cursor) =>

                if @history.length is 0 or @history[@history.length-1].query isnt query and @regex.white.test(query) is false
                    @history.push
                        query: query
                        broken: broken
                    if @history.length>@size_history
                        window.localStorage.rethinkdb_history = JSON.stringify @history.slice @history.length-@size_history
                    else
                        window.localStorage.rethinkdb_history = JSON.stringify @history
                    @history_view.add_query
                        query: query
                        broken: broken

        clear_history: =>
            @history.length = 0

        # The size of the history is infinite per session. But we will just save @size_history queries in localStorage
        save_query: (args) =>
            query = args.query
            broken_query = args.broken_query
            # Remove empty lines
            query = query.replace(/^\s*$[\n\r]{1,}/gm, '')
            if query[query.length-1] is '\n' or query[query.length-1] is '\r'
