Fix some bugs in the controller test runner