fix a couple templating issues that only showed up on GCC