Fix bug and add notif handler