Fix template body function signature bug