fix typo
export global var only if it's set to true
change template variable name