bug fix for JSON of type object