Change function call according to current API.