Reworked restore.