Fix problem with attachment of connection listner