Updated the handling of notificaiton.