Fixes top-level API context.