Make BufferInputStream more robust after dispose