template and path fixes