Updated to API changes.