   
   add_tag: (id, my_tags, tag_text) ->
     my_tags ?= []             #TODO: Remove on schema change
-    
-    #clear textbox and update suggestion filter
-    Session.get('tag_input_box')?.value = ''
     Session.set('filter_text', '')
     if tag_text != "" && not (tag_text in my_tags)
       my_tags.push(tag_text)
       Posts.update(id, {$set: {'my_tags': my_tags}})
       @suggestions?.remove(tag_text)
+    Meteor.flush()
 )
 
 Handlebars.registerHelper('tags', (context, object) ->

    "click button[name='start_tagging']": (event) ->
      if not event.isImmediatePropagationStopped()
        Session.set('current_post', @_id)
        Session.set('suggested_tags', @suggestions)
        Session.set('filter_text', '')
        Session.set('tag_input_box', undefined)
        event.stopImmediatePropagation()
        
    "click button[name='enter_tag']": (event) ->

Array.prototype.clone = ->
  return this.slice(0)

_.extend( Template.tagbox,

  displayed_tags: ->
    @my_tags ?= []                    #TODO: REMOVE on schema change
    visible = (tag for tag of @tags)
