fixed templating so that it won't blow up on reserved words