fix get template bug