Fix bugs in notification