Dev/issue 6596 aip restore v3

Use the variable assigned above?