Fix case when some fields are JSONObjects