     #clear textbox and update suggestion filter
     text_box.value = ''
     Session.set("filter_text_#{ id }", '')
-    Session.get("context_#{ id }").invalidate()
+    Session.get("context_#{ id }")?.invalidate()
 )
 
 Handlebars.registerHelper('tags', (context, object) ->

            Template.tagbox.add_tag(@_id, @my_tags, tag_text, tag_box)
          when 75 #K/Kill
            Session.get("suggestions_#{ @_id }").remove(tag_text)
            Session.get("context_#{@_id}").invalidate()
          
        event.stopImmediatePropagation()
    

        Session.set("tagging_#{ @_id }", true)  #Display tagbox
        
        Session.set("suggestions_#{ @_id }",
          if @suggestions? then @suggestions else ['tag'])
        
        event.stopImmediatePropagation()
        
