Update code due to API change.