fixing segfault for json data types