Fixed for new API changes.