bug fix for template directory