Fixed check for max connections. Compare global connection count with the global limit, and compare the torrent connection count with the torrent limit.