Bug fixes in the Statistics