I have an item with two slots and one materia that I want to replace, but it's the upper one in the materia retrieval window, but the bottom one is selected.

Is there any way to just pick which one I want to retrieve?
Or do I have to remove both, hope the lower one isn't destroyed, then pay to meld both of them.