Adapting the statistics for the new api