fixing sending of notification when creating a badge