fix template problem