Fix the epic headache that is shutdown in unit tests.