fixed some cases where gcc pickier about templates than vs2k13