Fixed torrent related code