Clean up some unintended global variable leakage