     @store_key = 'cols'
     @data_el = $('#columns_hider_data')
     @column_names = @columnNames()
-    @collection_name = window.location.href.match(/admin\/([^\/]+)/)?[1]
+    @collection_name = window.location.href.match(/admin\/([^\/\?]+)/)?[1]
     return unless @collection_name
     @data = @getData()
     @initDefaults()

      for col, i in @column_names
        data[@collection_name].push(i) if col.disabled
    data

  fetchData: ->
    window.localStorage?[@store_key] or $.cookie(@store_key)

  initButtons: ->
    @data_el.empty()

    $("#list > thead > tr > th, #list > tbody > tr > td").show()

$ ->
  window.columns_hider = new ColumnsHider()
