Updating to new API.