Fixing json read bugs