fix to avoid add templates with no template