connect() needs to be protected so it can be overridden (issue #161)