global variables disappearing

That's not a global variable, that's a class variable. Global
variables begin with a dollar sign.