Fix based on API changes.