diff --git a/pytest_html/resources/main.js b/pytest_html/resources/main.js
index 63e04ba7..5d49dbf7 100644
--- a/pytest_html/resources/main.js
+++ b/pytest_html/resources/main.js
@@ -111,7 +111,7 @@ function init () {
show_filters();
- toggle_sort_states(find('.initial-sort'));
+ sort_column(find('.initial-sort'));
find_all('.sortable').forEach(function(elem) {
elem.addEventListener("click",