Updating for the recent API change and upgrade.