Bugfix in retrieving statistics