Adapting to recent API changes