Update to work with latest API changes