Fix a few global leaks from the test cases.