fix panic resetting invalid stream id