Fix restauration script