preventing notifications from being shown twice