Removing parameters in document (Orchid)

So i’m trying to open a family document, remove some parameters and then close and save the document. For some reason parameters are only being removed from 1 document instead of 2 and the file is not saving (because the remove parameter node is getting null for some reason)

Can someone help me fix my script ?