Fix badge updating.