minor template fixes due to tighter checking by gcc