Fixed the template function