fix template file