bug fix: pointer reference caused global variable to change permanently for all lookups. This fix keeps the template string untouched and instead created a short lived pointer