Fix bug in notification scheduler