json stream parsing bug fix