fixing json parse issues