Bugfix for statistics