Fix dynamic_generate_table_rows extension and add end tag.