ditch some C++ setglobal calls