fix template variables, remove debug logging