fixed the circular reference problem while dumping data into json format, closes #189