             @_got_remote_data = new Date()
             @element.find(".webapp-console-terminal").css('opacity':'1')
             @element.find("a[href=\"#refresh\"]").removeClass('btn-success').find(".fa").removeClass('fa-spin')
-            @_ignore = true
             @reset()
             if @session.init_history?
                 #console.log("writing history")
                 try
+                    @_ignore = true
                     @terminal.write(@session.init_history)
                 catch e
                     console.log(e)


    client_keydown: (ev) =>
        #console.log("client_keydown")
        @mark_file_use()
        if ev.ctrlKey and ev.shiftKey
            switch ev.keyCode
                when 190       # "control-shift->"

            # On first write we ignore any queued terminal attributes responses that result.
            @terminal.queue = ''
            @terminal.showCursor()

        @session.on 'close', () =>
            @_connected = false
