fix num of connections computation