minor fixes in json generation