Fix overrelease of stream