fixing generated templates to match latest code