Port PIE from cm-10.1