fix resetVars invocation