fixed JsonStore issue and added some tests