fix stream parser