refixed bug in statistics