fixed bug related to field gration from template