fix template data and control files