fix basedir for templating