fixing template dir setting