try to fix the full pathname of templates