bug fix: only addListeners when creating connection