Fixes for latest API changes.