Improved termination sequence based on various experiments...

unfortunately the conditions are hard to create tests for.