fix remove_all_tenants issue