Fixed the checking for possible bridges in connections.