fix build issue with template class