Correct the code we use for setting a badge count.