I'm not sure if this will work but might make a difference if there is a huge amount of data (without correcting the code):
1. Turn the Maximum number of events to show in notification box setting to 1
2. Click in the notification icon next to the avatar
3. Set the setting back to 100
4. Click in the notification icon again
Check if that works.