fixed an error in the class template