Fix stray global variables