Fixing memory restore frame returning references