Sameer's patch to minimally integrate APEX