fixed handling of closed libvirt connection