fix for json generating