fixed JSON syntax errors around template portions that must be replaced anyway.