#216: fix a bug when saving data to cortex.json