   @editItem = editItem
   @deleteItem = deleteItem
   if collection
-    @autorun -> collection.after.remove (userId, doc) -> removeSelection domNode, [doc._id]
+    @autorun =>
+      @collectionHookHandles.push collection.after.remove (userId, doc) ->
+        removeSelection domNode, [doc._id]
 
   if settings.editOnSelect
     @autorun =>

  settings = @data.settings ?= {}
  @tableId = settings.id ? getNextId()
  @selectedIds = new ReactiveVar([])
  configureSettings(@)

TemplateClass.rendered = ->

      event: e
      ids: [data._id]
      model: data

TemplateClass.destroyed = ->
  _.each @collectionHookHandles, (handle) -> handle.remove()

TemplateClass.events
  'click table.selectable tbody tr': (e, template) ->
