fix excludes generation in template