fix template to be json compliant