Adapt to upstream API change