fix stream id and length goofs