Update JSON generation
Fix console error