Fixing json errors