fixed bugs with istrial json parsing