             @$el.toggleClass "minimized", 100
 
         sortBy : (field, old_field) ->
+
+            return unless @collection?
 
             re = new RegExp(" (#{_.values(@sortArrows).join("|")})$|$")
             dir = @collection.sortingDirection[field] ? 1

                    if @$el.find(document.activeElement).length is 0
                        @$el.removeClass "focussed"
                    @focussed = false
                    @collection.trigger "focusout"
                , 10
        
        plural : ->

            
            super options

            @setCollection @collection if @collection?

            @checkRequirements()
    
        setCollection: (collection) ->
            if collection?
                @collection = collection
                @collection.on "selected deselected reset", @checkRequirements, this
                @view.on "keypressed", @keypressedOnView, this if @hotkey?
  
        checkRequirements: ->
            enable = @allowed()
