Fixed problems with connect/disconnect notification.