Fixed some issues in the notification system.