Patch to fix processing of shared options