fixing json errors