Patches to fix API creation.