Fixed a bug in the connections.js