ensured proper precedence of template path. closes #47