Adapted to API change.