Fix bug for  connection event