small bugfix in insert method (when value is array> serialize to json)