Fixed small issue with CGT templates and the build system