fix crash because of JSON.stringify()