changed listener executions order. so that listener is fired when

connection is created.