UserVariables scope fixes