avoid JSON circular structure error