fixing a bug in the invitations badge shown at the top