diff --git a/app/helpers/stash_engine/admin_dashboard_helper.rb b/app/helpers/stash_engine/admin_dashboard_helper.rb
index 6d0181238..d11fd6392 100644
--- a/app/helpers/stash_engine/admin_dashboard_helper.rb
+++ b/app/helpers/stash_engine/admin_dashboard_helper.rb
@@ -1,3 +1,5 @@
+require 'csv'
+
module StashEngine
# rubocop:disable Metrics/AbcSize, Metrics/ModuleLength, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
module AdminDashboardHelper
diff --git a/app/views/stash_engine/admin_dashboard/count.js.erb b/app/views/stash_engine/admin_dashboard/count.js.erb
index f365f3998..dfc8ac222 100644
--- a/app/views/stash_engine/admin_dashboard/count.js.erb
+++ b/app/views/stash_engine/admin_dashboard/count.js.erb
@@ -1,2 +1,2 @@
-document.getElementById('count_and_export').innerHTML = `<%= number_with_delimiter(@count) %> results<%= link_to "Export all as CSV", stash_url_helpers.admin_dashboard_results_path(format: :csv), class: 'o-link__buttonlink' %>`;
+document.getElementById('count_and_export').innerHTML = `<%= number_with_delimiter(@count) %> results<%= link_to "Export all as CSV", stash_url_helpers.admin_dashboard_results_path(format: :csv, search: params[:search]), class: 'o-link__buttonlink' %>`;
document.getElementById('admin-pagination').innerHTML = "<%= escape_javascript(render(partial: 'pagination', locals: {count: @count, page: params[:page], page_size: params[:page_size], sort: params[:sort], direction: params[:direction], search: params[:search]})) %>";
\ No newline at end of file