Switched shutdown order to kill controller first

This will hopefully fix the test_nets wait issue