fixed few torrent-related bugs