Fix stability issues at the end of testcase run.