minor tweaks cuz gcc more careful about templates