statistics works correctly now