fix connections.js error when there are no connections to find