Fixed some bugs with notification.