     @value @async ->
       $result = @output()
       promise = graphite.complete(query).then (response) ->
-        response.metrics
+        _.map response.metrics, ({path, name, is_leaf}) -> {path, name, is_leaf: is_leaf == '1'}
 
       promise._lead_render = ->
         promise.done (metrics) =>

              $li.append $span
            do (text) =>
              $li.on 'click', =>
                if node.is_leaf == '0'
                  @run "find #{JSON.stringify text}"
                else
                  @run "q(#{JSON.stringify text})"
            $ul.append $li
          $result.append $ul
      promise

          for node in metrics
            $li = $ '<li class="cm-string"/>'
            text = node.path
            text += '*' unless node.is_leaf
            node_parts = text.split '.'
            for part, i in node_parts
              if i > 0
