Fix compile error due to API change.