     quit: (params) ->
         @emit 'quit'
         @interface().close()
-        process.stdin.destroy()
+        @settings.stdin.destroy()

                    @prompt() 
            else
                command = @set 'command'
                @run command
        return @
    
    # Return the readline interface and create it if not yet initialized

        @settings.stdin ?= process.stdin
        @settings.stdout ?= process.stdout
        @set 'env', @settings.env ? process.env.NODE_ENV ? 'development'
        @set 'command',
            if typeof settings.command isnt 'undefined'
            then settings.command
            else process.argv.slice(2).join(' ')
        @stack = []
        @styles = styles {stdout: @settings.stdout}
        process.on 'beforeExit', =>
