Adapt to API changes