fix error in connection.js