fix issue with array generation from json