diff --git a/tests/basic.py b/tests/basic.py
index 394ab0a..ab97fed 100644
--- a/tests/basic.py
+++ b/tests/basic.py
@@ -85,6 +85,9 @@
         if not self.controller.active:
             print "Controller startup failed; exiting"
             sys.exit(1)
+        if self.controller.switch_addr is None: 
+            print "Controller startup failed (no switch addr); exiting"
+            sys.exit(1)
         basic_logger.info("Connected " + str(self.controller.switch_addr))
 
     def tearDown(self):
@@ -291,9 +294,7 @@
     def runTest(self):
         basic_logger.info("Running StatsGet")
         basic_logger.info("Inserting trial flow")
-        request = message.flow_mod()
-        request.match.wildcards = ofp.OFPFW_ALL
-        request.buffer_id = 0xffffffff
+        request = flow_mod_gen(basic_port_map, True)
         rv = self.controller.message_send(request)
         self.assertTrue(rv != -1, "Failed to insert test flow")
         
@@ -306,6 +307,8 @@
         self.assertTrue(response is not None, "Did not get response")
         basic_logger.debug(response.show())
 
+test_prio["FlowStatsGet"] = -1
+
 class TableStatsGet(SimpleProtocol):
     """
     Get table stats 
@@ -315,9 +318,7 @@
     def runTest(self):
         basic_logger.info("Running TableStatsGet")
         basic_logger.info("Inserting trial flow")
-        request = message.flow_mod()
-        request.match.wildcards = ofp.OFPFW_ALL
-        request.buffer_id = 0xffffffff
+        request = flow_mod_gen(basic_port_map, True)
         rv = self.controller.message_send(request)
         self.assertTrue(rv != -1, "Failed to insert test flow")
         
@@ -336,9 +337,7 @@
 
     def runTest(self):
         basic_logger.info("Running " + str(self))
-        request = message.flow_mod()
-        request.match.wildcards = ofp.OFPFW_ALL
-        request.buffer_id = 0xffffffff
+        request = flow_mod_gen(basic_port_map, True)
         rv = self.controller.message_send(request)
         self.assertTrue(rv != -1, "Error installing flow mod")
 
diff --git a/tests/testutils.py b/tests/testutils.py
index 450b330..c7721fd 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -377,16 +377,19 @@
                                str(byte_count))
 
 def flow_msg_create(parent, pkt, ing_port=None, action_list=None, wildcards=0,
-               egr_port=None, egr_queue=None, check_expire=False):
+               egr_port=None, egr_queue=None, check_expire=False, in_band=True):
     """
     Create a flow message
 
     Match on packet with given wildcards.  
     See flow_match_test for other parameter descriptoins
     @param egr_queue if not None, make the output an enqueue action
+    @param in_band if True, do not wildcard ingress port
     """
     match = parse.packet_to_flow_match(pkt)
     parent.assertTrue(match is not None, "Flow match from pkt failed")
+    if in_band:
+        wildcards &= ~ofp.OFPFW_IN_PORT
     match.wildcards = wildcards
     match.in_port = ing_port
 
@@ -677,7 +680,19 @@
     expected_pkt = simple_tcp_packet(**base_pkt_params)
 
     return (ingress_pkt, expected_pkt, new_actions)
-        
+
+# Generate a simple "drop" flow mod
+# If in_band is true, then only drop from first test port
+def flow_mod_gen(port_map, in_band):
+    request = message.flow_mod()
+    request.match.wildcards = ofp.OFPFW_ALL
+    if in_band:
+        request.match.wildcards = ofp.OFPFW_ALL - ofp.OFPFW_IN_PORT
+        for of_port, ifname in port_map.items(): # Grab first port
+            break
+        request.match.in_port = of_port
+    request.buffer_id = 0xffffffff
+    return request
 
 def skip_message_emit(parent, s):
     """
@@ -694,3 +709,4 @@
         sys.stderr.write("(skipped) ")
     else:
         sys.stderr.write("(S)")
+
