Fixed bug: trailing comma was being added to HTML.