minor fixes for gcc stricter template code