handle many connections per client, bug fixes