Changed how badge is updated