Fix bug for modules in template paths