diff --git a/src/script/traffic_separation b/src/script/traffic_separation
index 3ddadfbda0e782906bb8343107c4ad455464a2ae..a2156a1d658372ba59ead0e6220fcec437c3dd5d 100755
--- a/src/script/traffic_separation
+++ b/src/script/traffic_separation
@@ -328,14 +328,6 @@ EOF
 			local netif_device=""
 			config_foreach find_vid_interface interface $vid
 
-			# support tagging for all map_port
-			for port in $map_ports ; do
-				uci -q get network.${name}.ports | grep -q "${port}" && {
-					uci -q del_list network.${name}.ports="${port}"
-				}
-				uci -q add_list network.${name}.ports="${port}${tag}"
-			done
-
 			# tag devices assigned to netif_device
 			[ -n "$netif_device" ] && {
 				uci -q del_list network.${name}.ports="${netif_device}:*"
@@ -345,6 +337,14 @@ EOF
 				return
 			}
 
+			# support tagging for all map_port
+			for port in $map_ports ; do
+				uci -q get network.${name}.ports | grep -q "${port}" && {
+					uci -q del_list network.${name}.ports="${port}"
+				}
+				uci -q add_list network.${name}.ports="${port}${tag}"
+			done
+
 			# non-map ports add PVID egress untagged
 			[ "${vid}" = "${PRIMARY_VID}" ] && {
 				for port in $(uci -q get network.${br_dev}.ports) ; do