fix variable locality (scope) that was writing bad tags in main config file