Changed checking of badges