fixed bug for load template