bug fix
diff --git a/R/collapse_rows.R b/R/collapse_rows.R
index d9a305c..bf0e036 100644
--- a/R/collapse_rows.R
+++ b/R/collapse_rows.R
@@ -45,6 +45,7 @@
 
   for (i in 1:nrow(collapse_matrix)) {
     matrix_row <- collapse_matrix[i, ]
+    names(matrix_row) <- names(collapse_matrix)
     target_row <- xml_child(kable_tbody, i)
     row_node_rm_count <- 0
     for (j in 1:length(matrix_row)) {