fixing json parsing