   @_searchParametersHandle = null
   @_subscriptionAutorunHandle?.stop()
   @_subscriptionAutorunHandle = null
+  @_searchResultHandle?.stop()
+  @_searchResultHandle = null
 
 Template.catalogFilter.documentsName = ->
   @documentClass.verboseNamePlural()

    reset.set false
    if Session.get(variables.active) and Session.get(variables.limit)
      Session.set variables.loading, true
      # Make sure there is only one subscribtion being executed at once
      subscriptionHandle.stop() if subscriptionHandle
      subscriptionHandle = Meteor.subscribe @data.subscription, Session.get(variables.limit), Session.get(variables.filter), Session.get(variables.sort),
        onReady: =>
          # Store how many results there are
          searchResult = SearchResult.documents.findOne
            name: @data.subscription
            query: [Session.get(variables.filter), Session.get(variables.sort)]
          Session.set variables.count, searchResult["count#{@data.documentClass.name}s"]

          Session.set variables.ready, true
          wasReady.set true


          Session.set variables.loading, false
    else
      Session.set variables.loading, false

  @_searchResultHandle?.stop()
  @_searchResultHandle = Deps.autorun =>
    fields = {}
    fields["count#{@data.documentClass.name}s"] = 1

    searchResultCursor = SearchResult.documents.find
      name: @data.subscription
      query: [Session.get(variables.filter), Session.get(variables.sort)]
    ,
      fields: fields

    # Store how many results there are
    searchResultCursor.observe
      added: (document) =>
        Session.set variables.count, document["count#{@data.documentClass.name}s"]
      changed: (newDocument, oldDocument) =>
        Session.set variables.count, newDocument["count#{@data.documentClass.name}s"]

Template.catalog.destroyed = ->
  @_resetSignalHandle?.stop()
