diff --git a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
index a953640..783c166 100644
--- a/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
+++ b/TestON/tests/FuncTopo/Dependency/FuncTopoFunction.py
@@ -4,6 +4,7 @@
 """
 import time
 import json
+import re
 
 def __init__( self ):
     self.default = ''
@@ -168,7 +169,7 @@
         tempResult = main.Mininet1.compareSwitches( MNTopo, devices[ i ] )
         switchResult.append( tempResult )
         if tempResult == main.FALSE:
-            main.log.error( main.topoName + ": ONOS-" + str( i ) +
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
                             " switch view is incorrect " )
 
     if all( result == main.TRUE for result in switchResult ):
@@ -184,7 +185,7 @@
         tempResult = main.Mininet1.comparePorts( MNTopo, ports[ i ] )
         portsResult.append( tempResult )
         if tempResult == main.FALSE:
-            main.log.error( main.topoName + ": ONOS-" + str( i ) +
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
                             " ports view are incorrect " )
 
     if all( result == main.TRUE for result in portsResult ):
@@ -200,7 +201,7 @@
         tempResult = main.Mininet1.compareLinks( MNTopo, links[ i ] )
         linksResult.append( tempResult )
         if tempResult == main.FALSE:
-            main.log.error( main.topoName + ": ONOS-" + str( i ) +
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
                             " links view are incorrect " )
 
     if all( result == main.TRUE for result in linksResult ):
@@ -216,7 +217,7 @@
         tempResult = main.Mininet1.compareHosts( MNTopo, hosts[ i ] )
         hostsResult.append( tempResult )
         if tempResult == main.FALSE:
-            main.log.error( main.topoName + ": ONOS-" + str( i ) +
+            main.log.error( main.topoName + ": ONOS-" + str( i + 1 ) +
                             " hosts view are incorrect " )
 
     if all( result == main.TRUE for result in hostsResult ):
@@ -231,8 +232,20 @@
     """
         Returns switch list using getSwitch in Mininet driver
     """
+    switchList = []
+    assignResult = main.TRUE
     switchList =  main.Mininet1.getSwitch()
-    print switchList
+    assignResult = main.Mininet1.assignSwController( sw=switchList,
+                                                     ip=main.ONOSip,
+                                                     port=6633 )
+
+    for sw in switchList:
+        response = main.Mininet1.getSwController( sw )
+        if re.search( "tcp:" + main.ONOSip[ 0 ], response ):
+            assignResult = assignResult and main.TRUE
+        else:
+            assignResult = main.FALSE
+
     return switchList
 
 def getHostsData( main ):
diff --git a/TestON/tests/FuncTopo/FuncTopo.py b/TestON/tests/FuncTopo/FuncTopo.py
index 35d9049..0b25315 100644
--- a/TestON/tests/FuncTopo/FuncTopo.py
+++ b/TestON/tests/FuncTopo/FuncTopo.py
@@ -47,6 +47,7 @@
         main.numSwitch = int( main.params[ 'MININET' ][ 'switch' ] )
         main.numLinks = int( main.params[ 'MININET' ][ 'links' ] )
         main.numCtrls = main.params[ 'CTRL' ][ 'num' ]
+        main.ONOSport = []
         main.hostsData = {}
         main.topoName = " "
         PULLCODE = False
@@ -58,12 +59,12 @@
         for i in range( 1, int( main.numCtrls ) + 1 ):
             main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
             main.nodes.append( getattr( main, 'ONOS' + str( i ) ) )
+            main.ONOSport.append( main.params[ 'CTRL' ][ 'port' + str( i ) ] )
 
         # -- INIT SECTION, ONLY RUNS ONCE -- #
         if init == False:
             init = True
 
-            main.ONOSport = []
             main.scale = ( main.params[ 'SCALE' ] ).split( "," )
             main.numCtrls = int( main.scale[ 0 ] )
 
@@ -195,7 +196,7 @@
         main.topoName = "TREE3-3"
         stepResult = main.TRUE
         main.step( "Tree 3-3 topology" )
-        mnCmd = "mn --topo=tree,3,3 --controller=remote,ip=$OC1 --mac"
+        mnCmd = "mn --topo=tree,3,3 --mac"
         stepResult = main.wrapper.testTopology( main,
                                                 mnCmd=mnCmd,
                                                 clean=False )
@@ -206,7 +207,7 @@
 
         main.step( "Torus 5-5 topology" )
         main.topoName = "TORUS5-5"
-        mnCmd = "mn --topo=torus,5,5 --controller=remote,ip=$OC1 --mac"
+        mnCmd = "mn --topo=torus,5,5 --mac"
         stepResult = main.wrapper.testTopology( main,
                                                 mnCmd=mnCmd,
                                                 clean=True )
