fix badge variable reference