Fixed an issue that prevent badges from showing on navbar

The badge shows correct after this change.