         when 'Info'
           infoTooltip editor, crange
         when 'Info, fallback to Type'
-          infoTypeTooltip editor.getBuffer(), crange
+          infoTypeTooltip editor, crange
         else
           Promise.reject ignore: true #this won't set backend status
 

      'haskell-ghc-mod:shutdown-backend': =>
        @process?.killProcess?()

    typeTooltip = =>
      @process.getTypeInBuffer(arguments...)
      .then ({range, type}) -> {range, text: type}
    infoTooltip = =>
      @process.getInfoInBuffer(arguments...)
      .then ({range, info}) -> {range, text: info}
    infoTypeTooltip = ->
      args = arguments
      infoTooltip(args...)
      .catch ->
        typeTooltip(args...)

    @disposables.add atom.commands.add 'atom-text-editor[data-grammar~="haskell"]',
      'haskell-ghc-mod:check-file': ({target}) =>

          editor: target.getModel()
          detail: detail
          tooltip: (crange) ->
            infoTypeTooltip target.getModel(), crange
      'haskell-ghc-mod:insert-type': ({target, detail}) =>
        Util = require './util'
        editor = target.getModel()
