At first glance this looks like it's working as intended. The trouble is, users occasionally get ghost notifications that show up as numbers in the corner when no notification actually exists. The only way to fix it is to wait until you get a real notification and press the "mark all as read" button.