fix num connections bug.