restore after failed optimization