fixed template specialization for gcc