Removed unneeded sorting on stats calculation