         if !@isValidPrefix(prefix) and !@force
             @manager.documentation.hide()
             return []
-
-        prefix = @fixPrefix(prefix)
+        prefix = @checkPrefix(prefix)
 
         that = this
 
-        new Promise (resolve) ->
+        return new Promise (resolve) ->
             that.manager.client.update(editor.getURI(), editor.getText()).then =>
                 that.manager.client.completions(editor.getURI(), {line: bufferPosition.row, ch: bufferPosition.column}).then (data) =>
                     that.clearSuggestions()

                        that.manager.documentation.hide()
                        return
                    for obj, index in data.completions
                        if index == maxItems
                            break
                        obj = that.fixCompletion(obj)


        @clearSuggestions()

    getMaxIndex: (length) ->
        Math.min(@maxItems, length)

    addSelector: (selector) ->
        @selector = @selector + ',' + selector
