fixed gcc-specific template issue