Fixed releasing of streams when removing tools