Fix bug in pause/restore VMs