Fixed many bugs: it now correctly handles activation/deactivation of badges