fix issue when saving selection from an XPS file