ENH:fix a bug of load template