Fix bug breaking a restart of restore