Fix crash when removing torrent