Fix title in template function