diff --git a/accton/accton_util.py b/accton/accton_util.py
index 5823a65..85dec8b 100755
--- a/accton/accton_util.py
+++ b/accton/accton_util.py
@@ -257,7 +257,7 @@
     if dst_mac is not None:
         action.append(ofp.action.set_field(ofp.oxm.eth_dst(dst_mac)))
 
-    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(vlanid)))
+    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vlanid)))
         
     action.append(ofp.action.group(group_id))
     
@@ -452,7 +452,7 @@
                 instructions=[
                   ofp.instruction.apply_actions(
                     actions=[
-                      ofp.action.set_field(ofp.oxm.vlan_vid(vlan_id))
+                      ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vlan_id))
                     ]
                   ),
                   ofp.instruction.goto_table(20)
@@ -473,7 +473,7 @@
                 instructions=[
                   ofp.instruction.apply_actions(
                     actions=[
-                      ofp.action.set_field(ofp.oxm.vlan_vid(vlan_id))
+                      ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vlan_id))
                     ]
                   ),
                   ofp.instruction.goto_table(20)
@@ -606,7 +606,7 @@
         if vrf!=0:
             actions.append(ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf)))
             
-        actions.append(ofp.action.set_field(ofp.oxm.vlan_vid(vlan_id)))
+        actions.append(ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vlan_id)))
         
         request = ofp.message.flow_add(
             table_id=10,
@@ -631,7 +631,7 @@
         if vrf!=0:
             actions.append(ofp.action.set_field(ofp.oxm.exp2ByteValue(exp_type=1, value=vrf)))
 
-        actions.append(ofp.action.set_field(ofp.oxm.vlan_vid(value=vlan_id)))
+        actions.append(ofp.action.set_field(ofp.oxm.vlan_vid(value=0x1000+vlan_id)))
 
         request = ofp.message.flow_add(
             table_id=10,
@@ -745,27 +745,29 @@
 
     return request    
     
-def add_unicast_routing_flow(ctrl, eth_type, dst_ip, mask, action_group_id, vrf=0, send_barrier=False):
+def add_unicast_routing_flow(ctrl, eth_type, dst_ip, mask, action_group_id, vrf=0, send_ctrl=False, send_barrier=False):
     match = ofp.match()
     match.oxm_list.append(ofp.oxm.eth_type(eth_type))
     if vrf != 0:
         match.oxm_list.append(ofp.oxm.exp2ByteValue(ofp.oxm.OFDPA_EXP_TYPE_VRF, vrf))
-    
-    if mask!=0:
-        match.oxm_list.append(ofp.oxm.ipv4_dst_masked(dst_ip, mask))
-    else:
-        match.oxm_list.append(ofp.oxm.ipv4_dst(dst_ip))
 
+    match.oxm_list.append(ofp.oxm.ipv4_dst_masked(dst_ip, mask))
+
+    instructions = []
+    instructions.append(ofp.instruction.goto_table(60))
+    if send_ctrl:
+        instructions.append(ofp.instruction.apply_actions(
+                            actions=[ofp.action.output( port=ofp.OFPP_CONTROLLER,
+                            max_len=ofp.OFPCML_NO_BUFFER)]))
+    else: 
+        instructions.append(ofp.instruction.write_actions(
+                        actions=[ofp.action.group(action_group_id)]))
 
     request = ofp.message.flow_add(
             table_id=30,
             cookie=42,
             match=match,
-            instructions=[
-                    ofp.instruction.write_actions(
-                        actions=[ofp.action.group(action_group_id)]),
-                    ofp.instruction.goto_table(60)
-                ],
+            instructions=instructions,
             buffer_id=ofp.OFP_NO_BUFFER,
             priority=1) 
 
@@ -1226,7 +1228,7 @@
     action=[]
     action.append(ofp.action.set_field(ofp.oxm.eth_src(src_mac)))
     action.append(ofp.action.set_field(ofp.oxm.eth_dst(dst_mac)))
-    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(vid)))    
+    action.append(ofp.action.set_field(ofp.oxm.vlan_vid(0x1000+vid)))    
     action.append(ofp.action.group(ref_gid))
     
     buckets = [ofp.bucket(actions=action)]
