add_rewrite_rule not load correct template

I created some rewrite rules using custom taxonomies: add_action( ‘init’, function(){ add_rewrite_rule(‘^brand/(.*)/type/(.*)/page/([0-9]{1,})/?’, ‘index.php?brand=$matches[1]&type=$matches[2]&paged=$matches[3]’, ‘top’); add_rewrite_rule(‘^brand/(.*)/type/(.*)?’, ‘index.php?brand=$matches[1]&type=$matches[2]’, ‘top’); add_rewrite_rule(‘^brand/(.*)/environment/(.*)/page/([0-9]{1,})/?’, ‘index.php?brand=$matches[1]&environment=$matches[2]&paged=$matches[3]’, ‘top’);…