Template fixes in /cg/io