change name of nameIndices to slotNameIndices to reflect the contents better
only update attachments if they change