bug fix to refactoring data-fields in templates