fix template id issue