fix template setting