fix template issue detected by gcc on recent checkins