Adapt to api changes.