added JSON.parse/JSON.stringify back to fix bug