fixups for template