Fixed some minor issues with the JSON generation