Fixing table template function definition