patched the JSON.stringify issue