Shutdown/abort sequence working much better

Now reliably exits at the end of the test :)