fix device delete