fixes bug in notification handling