Adapting to the API change