fixed stringifying JSON before submitting it in POST