           Session.set('tag_input_box', event.target)
         
         entered_text = event.target.value
-        suggested_tag = Session.get("suggested_tags")[0]
+        #TODO: change so we get the first FILTERED tag
+        
+        for tag in Session.get('suggested_tags')
+          if tag.search(Session.get('filter_text')) != -1
+            suggested_tag = tag
+            break
         
         switch event.keyCode
           when 13 #Enter: ADD ENTERED TEXT

              Template.tagbox.add_tag(@_id, @my_tags, suggested_tag)
          when 39 #Right-arrow: REMOVE SUGGESTED TAG
            if event.ctrlKey
              Session.get("suggested_tags").remove(suggested_tag)
          else    #Update filter with new text
            Session.set("filter_text", entered_text)
          
        event.stopImmediatePropagation()
    

    
  suggested_tags: ->
    filtered = []
    for tag in Session.get('suggested_tags')
      if tag? && tag.search(Session.get('filter_text')) != -1
        filtered.push(tag)
    return { suggested: true, tags: filtered }

  tagging_post: -> Session.equals('current_post', @_id)
  
  events: {
    
