fix template missing bug